Skip to content

Conversation

@JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Feb 24, 2023

This currently contains the bug that we correctly stream in but when the hydration continues we wipe the Suspense state with nothing and after 3 seconds replace it with the Counter content.

Another peculiar thing is that if we comment out the entry-client.jsx code that after the Counter resolves on the server the loading... boundary gets replaced with.. nothing

#259

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2023

⚠️ No Changeset found

Latest commit: bd73505

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

while (d.firstChild) e.parentNode.insertBefore(d.firstChild, e);

d.parentNode.removeChild(d);
requestAnimationFrame(() => {
Copy link
Member Author

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

// import { hydrate } from 'preact';
// import { App } from './App';

// hydrate(<App />, document);
Copy link
Member Author

@JoviDeCroock JoviDeCroock Feb 24, 2023

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

@developit
Copy link
Member

@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.

@JoviDeCroock
Copy link
Member Author

@developit The wiping stopped happening when we supported comments in Preact, I used the open PR we have and then everything worked correctly.

@JoviDeCroock JoviDeCroock deleted the streaming-demo branch March 30, 2023 13:11
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

Successfully merging this pull request may close these issues.

3 participants