Archives : August-2018

I have read this document about react-router Switch I understand the definition about Switch and Route But still couldn’t understand some points If I want to pick only one Route to render we use Switch like this <Switch> <Route exact path=”/” component={Home} /> <Route path=”/a” component={A} /> <Route path=”/b” component={B} /> </Switch> The point I ..

Read more

I’ve got my app setup as in the docs: Step 1 … import { createBrowserHistory } from ‘history’ import { applyMiddleware, compose, createStore } from ‘redux’ import { connectRouter, routerMiddleware } from ‘connected-react-router’ … const history = createBrowserHistory() const store = createStore( connectRouter(history)(rootReducer), // new root reducer with router state initialState, compose( applyMiddleware( routerMiddleware(history), // ..

Read more