Warning: findDOMNode is deprecated in StrictMode.
Author: jasonz3gCreated Oct 20, 2023Updated Jan 30, 2025
I've looked through the historical issues, but none of them worked in my case.
The code is roughly like this
<tbody>
<TransitionGroup component={null} >
{
anArrayInReduxStore.map((e, _) => {
<CSSTransition key={e.id} classNames="fade"
timeout={300}
appear={true}
exit={false}
>
<CustomComponent data={e}/> //a very complex row in a table
</CSSTransition>
})
}
</TransitionGroup>
</tbody>If i use code below, the warning will disapear, but the animation is gone, and the more serious thing is, when i remove element in {anArrayInReduxStore}, the Row Element doesn't remove
The code is roughly like this
const TransitionNode = ({ e }) => {
const nodeRef = React.useRef(null)
return (
<CSSTransition key={e.id} classNames="fade"
timeout={300}
appear={true}
nodeRef={nodeRef}
>
<CustomComponent data={e}/> //a very complex row in a table
</CSSTransition>
);
} <tbody>
<TransitionGroup component={null} >
{
anArrayInReduxStore.map((e, _) => {
<TransitionNode key={e.id} data={e} />
})
}
</TransitionGroup>
</tbody>Source: reactjs/react-transition-group