-
-
Notifications
You must be signed in to change notification settings - Fork 97
create demo for streaming render #280
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
Conversation
|
| while (d.firstChild) e.parentNode.insertBefore(d.firstChild, e); | ||
|
|
||
| d.parentNode.removeChild(d); | ||
| requestAnimationFrame(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a bug where the app server-side renders the whole document, we have to wait for the d.children to actually be populated which is an afterFrame
demo/src/entry-client.jsx
Outdated
| // import { hydrate } from 'preact'; | ||
| // import { App } from './App'; | ||
|
|
||
| // hydrate(<App />, document); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently commented out, uncommenting this will make the CommentNode dissapear for the closing comment and hence kill island-appends
de977ec to
a621153
Compare
|
@JoviDeCroock do you know if the wipe issue you mentioned might be due to the Suspense fallback/timeout we have in compat? That makes me wonder if we should do a version of this demo using lazy()+ErrorBoubdary preact-iso, since they never render a fallback. |
|
@developit The wiping stopped happening when we supported comments in Preact, I used the open PR we have and then everything worked correctly. |
This currently contains the bug that we correctly stream in but when the hydration continues we wipe the
Suspensestate with nothing and after 3 seconds replace it with the Counter content.Another peculiar thing is that if we comment out the
entry-client.jsxcode that after the Counter resolves on the server theloading...boundary gets replaced with.. nothing#259