Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate streaming SSR approaches #32

Open
lewisl9029 opened this issue Feb 1, 2022 · 1 comment
Open

Investigate streaming SSR approaches #32

lewisl9029 opened this issue Feb 1, 2022 · 1 comment

Comments

@lewisl9029
Copy link
Owner

https://emotion.sh/docs/ssr

Current approach won't be compatible with streaming. The way emotion supports streaming is by outputing <style> tags next to each element, which rules out a hook api because hooks can't render elements.

@lewisl9029
Copy link
Owner Author

lewisl9029 commented Feb 1, 2022

Hmm... Would it be problematic to insert the stylesheet at the end of body instead? By then all the styles used will have been cached. Not sure if it could result in partial unstyled content? Does streaming html render before the stream is read to completion? or just parse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant