Skip to content

SSR-only server functions? #2550

Answered by gbj
caligin asked this question in Q&A
Apr 22, 2024 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

That looks pretty straightforward to me. It's pretty rare that you want the data simply not to be accessible if you are navigating from another page, but if that's what you want, that's what you want!

i.e., taking a glance at this application, you are using server-side rendering and client-side hydration including the router. When you only have one page it doesn't matter because this one page is the only starting point. If you add another page like /foo, then if you load /foo and then click a link in the browser to /, it will give you the None version of the data even though it does exist on the server, because subsequent page navigations are rendered in the browser.

If that's what you wa…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@caligin
Comment options

@gbj
Comment options

@caligin
Comment options

@gbj
Comment options

Answer selected by caligin
@caligin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants