Replies: 2 comments 7 replies
-
I think the canonical solution (at least for now) is to create a store in render and pass it down the tree using Context. I'm not sure if we have dedicated docs for it. @dbritto-dev ? #3055 is the discussion to avoid such context usage. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@sovetski you should use |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been looking for a while, but I can't find anything concrete in the docs, PRs, issues, or discussions (maybe I haven't searched for the right information).
Basically, imagine I have a very simple store:
What I simply want is to initialize the notes on page load server-side with data coming from the database, instead of doing this on the client side, as it's less optimized.
I also don't want to use setNotes (I mean on first page load, then it is ok) on the client side because that would cause a double re-render, and I don't find it very clean either.
To be clear: I am ONLY talking about hydrating the data on the server on the first page load, not managing the state on the server.
Can someone help me with this? Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions