React JS: Pure Compenet code example
Example 1: pure components
// history.js
import { createBrowserHistory } from 'history'
export default createBrowserHistory({
/* pass a configuration object here if needed */
})
Example 2: pure components
// then, in redux actions for example
import { push } from 'react-router-redux'
dispatch(push('/some/path'))