サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
TGS2024
github.com/ReactTraining
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
You can get access to the history object's properties and the closest <Route>'s match via the withRouter higher-order component. withRouter will pass updated match, location, and history props to the wrapped component whenever it renders. import React from "react"; import PropTypes from "prop-types"; import { withRouter } from "react-router"; // A simple component that shows the pathname of the cu
Code Splitting One great feature of the web is that we don't have to make our visitors download the entire app before they can use it. You can think of code splitting as incrementally downloading the app. To accomplish this we'll use webpack, @babel/plugin-syntax-dynamic-import, and loadable-components. webpack has built-in support for dynamic imports; however, if you are using Babel (e.g., to com
Migrating from v2/v3 to v4 React Router v4 is a complete rewrite, so there is not a simple migration path. This guide will provide you with a number of steps to help you understand how to upgrade your application. Note: This migration guide is for both React Router v2 and v3, but for brevity, references to previous versions will only mention v3. For react-router-redux users: This library has been
react-router@4.0.0: Publish mjackson tagged this Mar 11, 2017 · 10 commits to master since this tag - react-router-config@1.0.0-beta.1 - react-router-dom@4.0.0 - react-router-native@4.0.0 - react-router-redux@5.0.0-alpha.1 - react-router-website@4.0.0 - react-router@4.0.0
THIS IS EXPERIMENTAL SO IF YOU USE IT AND FIND PROBLEMS THEY ARE YOUR PROBLEMS THAT YOU MUST SOLVE, MAYBE EVEN ALL BY YOURSELF. react-router-addons-controlled attempts to treat <Router> like a controlled component (think <input value onChange/> ). Unfortunately, it's not that simple. You can't actually control the browser history, so it's more a two-way data binding situation. However, in the majo
Index Routes and Index Links Index Routes To illustrate the use case for IndexRoute , imagine the following route config without it: < Router > < Route path = " / " component = {App} > < Route path = " accounts " component = {Accounts} / > < Route path = " statements " component = {Statements} / > < / Route > < / Router > When the user visits / , the App component is rendered, but none of the chil
このページを最初にブックマークしてみませんか?
『React Training』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く