3 ms·
>It's also not really accurate to say it's rendered twice Not sure if we're on same boat here :). By rendered twice I mean: Let's imagine we use React and som
by finchisko 7y ago
>It's also not really accurate to say it's rendered twice
Not sure if we're on same boat here :). By rendered twice I mean:
Let's imagine we use React and some store management like redux.
1. Visit some SSR rendered site. Browser receives html (which represents some initial state of an app - rendered by the server)
2. Browser fetches some json representing initial state (hydration). It's the same state that server used for rendering html.
3. State atom was null in step 1. and changed to some initial state in step 2, which basically means full rerender (second) of an app.