如何解决“ data-rbd-draggable-context-id”不匹配服务器:“ 1”客户端:“ 0”,带有react-beautiful-dnd和next.js

问题描述

当我尝试将react-beautiful-dndnext.js一起使用(或通常与服务器端渲染一起使用)时,在对项目进行重新排序并刷新页面后,出现此错误:

react-dom.development.js:88 Warning: Prop `data-rbd-draggable-context-id` did not match. Server: "1" Client: "0"

这(取决于第一个):

react-beautiful-dnd.esm.js:39 react-beautiful-dndA setup problem was encountered.> Invariant failed: Draggable[id: 1]: Unable to find drag handle

我尝试使用resetServerContext()重设服务器上下文计数器,但是它不能按预期工作。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)