You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suspense doesn't work as expected when throwing promises multiple times. In such case(s) content gets duplicated - it seems that the old component disconnects from its parent aand stays in the dom.
Something goes crazy with unmounting/parking the old vnodes. When wrapping the <MyWrapper /> in a <div> it is at least unmounted while the fallback is rendered but the old DOM node is inserted again after the suspension clears. I'll try to dig into this the following days.
Btw. seems we have a test for this case but it doesn't work 😓
Suspense doesn't work as expected when throwing promises multiple times. In such case(s) content gets duplicated - it seems that the old component disconnects from its parent aand stays in the dom.
This is not happening with React's Suspense.
Reproduction
Example of the problem in Preact:
https://codesandbox.io/s/amazing-jennings-6b21f?file=/src/index.jsx
The same example in React: (elements don't get duplicated)
https://codesandbox.io/s/prod-shape-345d2?file=/src/App.jsx
Steps to reproduce
Throw a promise multiple times from a component inside of a
Suspense
.Expected Behavior
Content will not be duplicated.
Actual Behavior
Content gets duplicated on each
throw
promise after the first one.The text was updated successfully, but these errors were encountered: