Skip to content

Instantly share code, notes, and snippets.

@cpojer

cpojer/app.js

Created Aug 27, 2015
Embed
What would you like to do?
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')
);
@taion

This comment has been minimized.

Copy link

@taion taion commented Sep 27, 2015

Probably best to change https://gist.github.com/cpojer/7b274ea7e255481e1d2d#file-app-js-L7 to history={history} given further API changes to react-router.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment