Created
August 27, 2015 23:23
-
-
Save cpojer/7b274ea7e255481e1d2d to your computer and use it in GitHub Desktop.
This file contains 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
import ReactRouterRelay from 'react-router-relay'; | |
// ... | |
React.render( | |
<Router | |
history={new BrowserHistory()} | |
createElement={ReactRouterRelay.createElement}> | |
<Route | |
name="home" // added a name to the route | |
path="/" | |
component={App} | |
queries={AppQueries} // and the query | |
/> | |
<Route | |
name="widget" | |
path="/widget/:id" | |
component={Widget} | |
queries={WidgetQueries} | |
/> | |
</Router>, | |
document.getElementById('root') | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably best to change https://gist.github.com/cpojer/7b274ea7e255481e1d2d#file-app-js-L7 to
history={history}
given further API changes to react-router.