react-head
react-head copied to clipboard
Document usage with SSR streaming
As per discussion in #18, creating an issue that can serve as starting point for some documentation around using react-head with SSR streaming. Both #14 and #18 mention that there is support for it, just no recommended usage.
For reference, here are the docs that react-helmet-async has for streaming SSR:
https://github.com/staylor/react-helmet-async#streams
cc: @jamesjjk
Including my response from Twitter on here...
I think the same mechanism that works for react-helmet-async should also work for react-head. The challenge with streaming is you don’t always know about all the head updates before you start streaming. You’ll need to either buffer the stream and deliver it all at once, or rely on client rendering to have it update to the latest changes in head once in the browser.
That being said, a PR to update Docs would be appreciated. Thanks! :)
Where I can find example how to use it with SSR sreaming? (or why PR was merged?)
@max-mykhailenko it would work the same way it does here: https://github.com/staylor/react-helmet-async#streams
It would be nice to update our docs or example app with specific instructions (PRs welcome!) 😁