fastify.state. After the route handler finishes, a onSendAsyncHookHandler is invoked, which passes to renderToStream a bundle of links to assets (collected from the Vite manifest), initialState, and a few other parameters. And then returns a stream to the client:App component, I render the entire HTML document. In the <head> I add <link> tags for the assets and a <script> pointing to the client entry for hydration. I store the initialState in a custom StoreProvider. I’m using a Router wrapped in Suspense with simple lazy routes that import each page.explicitLinks, regular <a> links on hover and the useNavigate callback load some static chunks for the target route. But I also need to send a request to the BFF to fetch JSON for the store, which should then be merged into the current store.application/json, show some kind of progress bar (classic for an SPA), wait for the response, and at the moment of the transition merge the new store into the old one.