Last active
April 6, 2018 17:15
-
-
Save hackingbeauty/af72ad32a5504191b4f4964d5c6ac7f0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* In src/core/utils create a file called routing.js and add this code (I'm assuming you're using hash-based URLs) */ | |
| import { createHashHistory } from 'history' | |
| export default createHashHistory() | |
| /* Then, in your Action Creators, import this file and you can use React-Router to navigate programatically */ | |
| import history from 'core/utils/routing' | |
| ... | |
| history.push('/your-route') | |
| ... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment