Open
Description
With strict mode on in React 19, when a keyed React element is moved in an array its effects are rerun, even if they have no dependencies. The same behavior is not done for elements that stay in place. This is different from React 18 where moving an element did not trigger rerunning effects.
I would like confirmation if this is intended or a bug, but I did not see it documented so I assume it is a bug.
React version: 19.0.10
Steps To Reproduce
Here is a repro in React 19: https://stackblitz.com/edit/react-ts-qmpiwmru?file=App.tsx,index.tsx
And the same in React 18: https://stackblitz.com/edit/react-ts-pzgjq9ay?file=App.tsx
The current behavior
All effects are rerun when a keyed React element is moved in a child array.
The expected behavior
No effects are run, like React 18.