Skip to content

Commit ea0f3e5

Browse files
committed
update docs for server rendering
1 parent 97ab06a commit ea0f3e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/00 Guides/Server Rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ import routes from './routes';
3131
// you'll want to configure your server to serve up static assets, and
3232
// and then handle the rest with React Router
3333
serveNonStaticPaths((req, res) => {
34-
var location = new Location('/the/path', { the: 'query' });
34+
var location = new Location(req.path, req.query);
3535

36-
Router.match(routes, location, (error, initialState, transition) => {
36+
Router.run(routes, location, (error, initialState, transition) => {
3737
// do your own data fetching, perhaps using the
3838
// branch of components in the initialState
3939
fetchSomeData(initialState.components, (error, initialData) => {

0 commit comments

Comments
 (0)