Skip to content

Commit ebaf437

Browse files
committed
Merge pull request #2210 from timdorr/revert-2192-patch-1
Revert "Update ServerRendering.md"
2 parents 7c15589 + 508fa6e commit ebaf437

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/guides/advanced/ServerRendering.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ It looks something like this with an imaginary JavaScript server:
1616
```js
1717
import { renderToString } from 'react-dom/server'
1818
import { match, RoutingContext } from 'react-router'
19-
import createLocation from 'history/lib/createLocation'
2019
import routes from './routes'
2120

2221
serve((req, res) => {
2322
// Note that req.url here should be the full URL path from
2423
// the original request, including the query string.
25-
const location = createLocation(req.url);
26-
match({ routes, location }, (error, redirectLocation, renderProps) => {
24+
match({ routes, location: req.url }, (error, redirectLocation, renderProps) => {
2725
if (error) {
2826
res.send(500, error.message)
2927
} else if (redirectLocation) {

0 commit comments

Comments
 (0)