#Using Streaming with Suspense on Custom Framework Data mode

1 messages · Page 1 of 1 (latest)

dense silo
#

Hello, I have a RR app freshly migrated to v7. It is using data loaders for SSR rendering in custom framework mode using createStaticHandler (along createBrowserRouter and RouterProvider) and express.
I am happy with this setup because it allows me to have custom code on the server side, allowing me to expose some API endpoints and deal with advanced SSR features like setting OG data, so I would like to stay away from framework mode if possible.
However now that I have migrated to v7 I wanted to try new features such as streaming some of my loader's data to suspense because according to the availability table it should be possible.
After some unsuccessful tests, trying to Await a promise returned by my loader I feel like I am missing some piece of config to make it work, at least I don't really understand how my express server could make streaming work without more changes on server side. Currently the promises property I put in the data loader on server side are retrieved as empty objects {} on client side after hydration.

Is there any examples of using streaming in Framework Data mode around here so I could observe a correct working example?

Thank you

rough lintel
#

<@&771063780541071411>

lavish timber
#

Thanks