Skip to content

Commit

Permalink
Fix typo in ssr.md (#8324)
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Nov 12, 2021
1 parent 1becc31 commit 263302d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/guides/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ export default function App() {
Here's a simple express server that renders the app on the server. Note the use of `StaticRouter`.

```js filename=server.entry.js
import express from "express"
import express from "express";
import ReactDOMServer from "react-dom/server";
import { StaticRouter } from "react-router-dom/server";
import App from "./App";

let app = express();

app.get("*", ((req, res)) => {
app.get("*", (req, res) => {
let html = ReactDOMServer.renderToString(
<StaticRouter location={req.url}>
<App/>
<App />
</StaticRouter>
);
res.send("<!DOCTYPE html>" + html);
})
});

app.listen(3000);
```
Expand Down

0 comments on commit 263302d

Please sign in to comment.