Skip to content

Commit 8412d98

Browse files
Update src/routes/solid-start/advanced/auth.mdx
Co-authored-by: Sarah <hello@sarahgerrard.me>
1 parent 5b0721f commit 8412d98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/solid-start/advanced/auth.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ export default function Page() {
5757
Once the user hits this route, the router will attempt to fetch `getPrivatePosts` data.
5858
If the user is not signed in, `getPrivatePosts` will throw and the router will redirect to the login page.
5959

60-
Setting `{ deferStream: true }` will wait until `getPrivatePosts` resolves before loading the page. Otherwise, opening the page directly will error, because server side redirects cannot occur after an initial response has streamed to the client.
60+
To prevent errors when opening the page directly, set `deferStream: true`.
61+
This would ensure `getPrivatePosts` resolves before the page loads since server-side redirects cannot occur after streaming has started.

0 commit comments

Comments
 (0)