We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version information (版本信息) @2.4.2
Describe the bug (描述问题) BUG:组件使用composer渲染自定义组件之后, 每次发送完消息,我自己定义的就会强制刷新,导致里面刚打印的文本会随着刷新丢失。
Steps To Reproduce (重现步骤) bug:演示:
具体代码实现如下: 1.的使用,以及自定义composer 2.项目页面
Link to minimal reproduction (最小化重现链接) 有一篇csdn的博客,也有类似的自定义composer重新强制渲染的说明: https://blog.csdn.net/runrun117/article/details/118223631 Expected behavior (期望的结果是什么) 有人可以给出解决建议和思路
The text was updated successfully, but these errors were encountered:
遇到了,临时处理在组件外加了个变量记录输入的值, const [inputValue, setInputValue] = useState(localInputValue)
Sorry, something went wrong.
@ylinwind 代码是怎么写的呀
const MemoizedCustomComposer = useCallback( (props: any) => ( <CustomComposer {...props} /> ), [] ) <Chat Composer={MemoizedCustomComposer} messages={messages} renderMessageContent={renderMessageContent} onSend={handleSend} />
使用useCallback包裹自定义composer,依赖项设置为[]
No branches or pull requests
Version information (版本信息)
@2.4.2
Describe the bug (描述问题)
BUG:组件使用composer渲染自定义组件之后,
每次发送完消息,我自己定义的就会强制刷新,导致里面刚打印的文本会随着刷新丢失。
Steps To Reproduce (重现步骤)
bug:演示:
具体代码实现如下:
1.的使用,以及自定义composer
2.项目页面
Link to minimal reproduction (最小化重现链接)
有一篇csdn的博客,也有类似的自定义composer重新强制渲染的说明:
https://blog.csdn.net/runrun117/article/details/118223631
Expected behavior (期望的结果是什么)
有人可以给出解决建议和思路
The text was updated successfully, but these errors were encountered: