Skip to content

Commit 0ea44c7

Browse files
author
Maximilian Hoffmann
committed
pass req.url instead of req.path
Otherwise `this.getQuery()` from the `Router.State` mixin will always return an empty object, as the query string isn’t part of the matched route.
1 parent 5d0cd2a commit 0ea44c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/server-rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ var routes = (
1919

2020
// if using express it might look like this
2121
app.use(function (req, res) {
22-
// pass in `req.path` and the router will immediately match
23-
Router.run(routes, req.path, function (Handler) {
22+
// pass in `req.url` and the router will immediately match
23+
Router.run(routes, req.url, function (Handler) {
2424
var content = React.renderToString(<Handler/>);
2525
res.render('main', {content: content});
2626
});

0 commit comments

Comments
 (0)