You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(how-to/spa): add more details about generating the index.html (#12592)
* Update spa.md to include more details about generating the index.html
* Update docs/how-to/spa.md
---------
Co-authored-by: Brooks Lybrand <[email protected]>
Copy file name to clipboardExpand all lines: docs/how-to/spa.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,4 +71,4 @@ In contrast `react-router build` (with server rendering disabled) pre-renders yo
71
71
- Use React components to generate the initial page users see
72
72
- Re-enable server rendering later without changing anything about your UI
73
73
74
-
This is also why your project still needs a dependency on `@react-router/node`.
74
+
React Router will still server render your index route to generate that `index.html` file. This is why your project still needs a dependency on `@react-router/node` and your routes need to be SSR-safe. That means you can't call `window` or other browser-only APIs during the initial render, even when server rendering is disabled.
0 commit comments