如何解决反应警告:findDOMNode在StrictMode中已弃用
我正在尝试使用CSSTransition组,但收到警告“警告:StrictMode中已弃用findDOMNode。”。我一直在寻找Internet上的不同线程,但是它们都不有用,或者至少不确定如何实现它们。关于如何引用代码的任何想法?
<TransitionGroup>
{tareasproyecto.map((tarea) => (
<CSSTransition key={tarea.id} timeout={300} classNames="tarea">
<Tarea tarea={tarea} />
</CSSTransition>
))}
</TransitionGroup>
下面是我收到的错误
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode. Instead,add a ref directly to the element you want to reference. Learn more about using refs safely here
谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。