Using React.Children.map in getChildMapping is causing element keys to change.
Author: maitrungdongCreated Oct 21, 2024Updated Oct 21, 2024
What is the current behavior?
When I compare keys in child elements then get an issue that these keys has an additional prefix .$.
I think that is an unpredictable behavior and can make some bugs!!!
What is the expected behavior?
I want to these keys should be persisted.
Could you provide a CodeSandbox demo reproducing the bug?
I found this issue in the code base. The reason is using Children.map in getChildMapping method.
A similar issue on stackoverflow: link
Source: reactjs/react-transition-group