React Routerメモ

React Routerメモ

Github
Document

to prop *

replace prop *

innerRef prop *

Linkにstyleの設定を加えたもの

Route *

const FooRoute = ({ component, ...props }) => (
  <Route {...props} render={props => (
      bar ? (
        React.createElement(component, props)
      ) : (
        <Redirect to={ pathname: '/login', state: { from: props.location } } />
      )
    )}
  />
)

component prop *

render prop *

children prop *

path prop *

exact prop *

strict prop *

location prop *

sensitive prop *

location *

<Router location={location}/>
<Switch location={location}/>

match *

history *


redux-actionsメモ