-
Notifications
You must be signed in to change notification settings - Fork 11
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
Server side rendering #3
Comments
Unfortunately, I don't have an example of completed server-side rendering that would include React Coroutine. I don't use server-side rendering at work, so wasn't able to have some focus/environment to work on this exact task. Currently, I'm trying to create an example using new Context API, Cache Provider, and React Coroutine. This doesn't seem to be trivial so it could be added to the docs, but I'll push it as a soon as code is polished enough. I think, the bigger limitation in using React Coroutine is the fact it needs async render to string supported by React. And that's something is not supported at the moment, from what I know. Are there any special techniques you know that could potentially work with React Coroutine? |
For server side rendering it could render one page to string more than once, effectively "resolving" the promises, or in Like, first time you Resolve them and then do a proper render with the fetched data. |
my 5 cents imagine compA should fetch data like { id: 1, name: name, extra_key: 2 } then as suggests streamich it should always re-render while whole tree will be processed... p.s. still waiting async renderer too) i believe then code splitting + server side rendering become true without headache |
Deep async generator require to run render several times. I didn't catch how we can move deep API call to the top level using context and only one additional render. |
Does it work on server side?
The text was updated successfully, but these errors were encountered: