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

Ordering of children in a Fragment changes in re-renders #4123

Closed
charlier opened this issue Sep 1, 2023 · 0 comments · Fixed by #4125
Closed

Ordering of children in a Fragment changes in re-renders #4123

charlier opened this issue Sep 1, 2023 · 0 comments · Fixed by #4125

Comments

@charlier
Copy link

charlier commented Sep 1, 2023

Describe the bug

After updating from 10.16.0 to 10.17.1, when re-rendering, the ordering of children inside a Fragment seems to change.

This sounds suspiciously similar to #4122 - to the point I was just going to add a little "me too" to that issue... But that also seems to happen on older versions of preact & this doesn't rely on preact-compat at all, so I'm not sure if it's unrelated, or has the same underlying root cause.

To Reproduce

Here's a (rather contrived) example with a Fragment (After ~1 second a hook/reducer on a timer will cause a re-render and the content will sit above the header).

https://codesandbox.io/s/dreamy-benji-cm79jk?file=/src/containers/job.js

Either downgrading preact, or Changing the Fragment to just a div as a workaround works flawlessly.

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 a pull request may close this issue.

1 participant