Skip to content

Commit 1382752

Browse files
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]>
1 parent aa6d022 commit 1382752

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/how-to/spa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ In contrast `react-router build` (with server rendering disabled) pre-renders yo
7171
- Use React components to generate the initial page users see
7272
- Re-enable server rendering later without changing anything about your UI
7373

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

Comments
 (0)