We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1becc31 commit 263302dCopy full SHA for 263302d
docs/guides/ssr.md
@@ -48,21 +48,21 @@ export default function App() {
48
Here's a simple express server that renders the app on the server. Note the use of `StaticRouter`.
49
50
```js filename=server.entry.js
51
-import express from "express"
+import express from "express";
52
import ReactDOMServer from "react-dom/server";
53
import { StaticRouter } from "react-router-dom/server";
54
import App from "./App";
55
56
let app = express();
57
58
-app.get("*", ((req, res)) => {
+app.get("*", (req, res) => {
59
let html = ReactDOMServer.renderToString(
60
<StaticRouter location={req.url}>
61
- <App/>
+ <App />
62
</StaticRouter>
63
);
64
res.send("<!DOCTYPE html>" + html);
65
-})
+});
66
67
app.listen(3000);
68
```
0 commit comments