react-head icon indicating copy to clipboard operation
react-head copied to clipboard

Document usage with SSR streaming

Open oyeanuj opened this issue 6 years ago • 3 comments

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

oyeanuj avatar Dec 28 '18 17:12 oyeanuj

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! :)

tizmagik avatar Jan 02 '19 18:01 tizmagik

Where I can find example how to use it with SSR sreaming? (or why PR was merged?)

max-mykhailenko avatar Apr 02 '19 07:04 max-mykhailenko

@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!) 😁

tizmagik avatar Apr 12 '19 18:04 tizmagik