installHook.js:1 Warning: Encountered two children with the same key, msg_2. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. Error Component Stack
#1712
Replies: 1 comment
-
|
Hi @VampireZc! I'm Dosu and I’m helping the x team. 这个问题在社区中是已知的,主要原因是 chat 组件内部用 useRef 生成消息 id(如 常见的解决办法有:
如果还有问题,建议检查 setMessages、消息 id 生成逻辑,以及 conversationKey 是否一致。这样可以彻底避免 key 重复和消息重复渲染。 To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
chat组件是公用组件,在内嵌引用里面开始对话,点击跳转全屏之后接着对话,全屏的消息生成id会重复,造成输出时候,已经回复完成的消息再次加载。请问有遇到这种情况吗?

Beta Was this translation helpful? Give feedback.
All reactions