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

Bug: StrictMode remount element that only update #31907

Open
Xiaoooyooo opened this issue Dec 25, 2024 · 0 comments
Open

Bug: StrictMode remount element that only update #31907

Xiaoooyooo opened this issue Dec 25, 2024 · 0 comments
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@Xiaoooyooo
Copy link

React version: 19.0.0

Steps To Reproduce

  1. use StrictMode
  2. render a list in any way
  3. change the order of the list

Link to code example: codesandbox

The current behavior

When change the order of the list, the list item unmounted and then mounted, except for the first element.

The expected behavior

It should not remount during the update phase.

I test the same code on react 18, which has no problem.

@Xiaoooyooo Xiaoooyooo added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

1 participant