reactjs - react 聊天引擎中的 renderChatFeed 属性正在渲染自定义聊天提要组件的无限循环
问题描述
//App.js file
import {ChatEngine} from "react-chat-engine";
import './App.css';
import ChatFeed from "./components/ChatFeed";
const App =()=> {
return (
<ChatEngine
height="100vh"
projectID="0e3104a3-d472-4764-9990-2845352801b9"
userName="Admin"
userSecret="123123"
renderChatFeed={(chatAppState) => <ChatFeed {...chatAppState}/>}
//renderChatFeed={(chatAppProps)=>{ return <ChatFeed {...chatAppProps}/>}}
/>
);
}
//ChatFeed component file
const ChatFeed = (props) => {
console.log(props);
return (
<div>
ChatFeed
</div>);
}
export default ChatFeed;
我正在使用使用 renderChatFeed 函数的自定义 chatFeed 组件,但聊天提要组件不会停止呈现我不明白是什么问题
解决方案
推荐阅读
- ios - 未处理的异常:Foundation.MonoTouchException:
发生了 - makefile - Makefile 运行命令行程序
- android - 像素 2 手机上 802.11 无线网卡的 SDIO 总线和省电模式超时
- ios - 应用在 iOS 中播放本地音频后,Webview HTML5 视频停止
- java - WebDriverException:未知错误:无法将窗口状态更改为最大化,当前状态在 MAC OS X 上的 Chrome 70 和 Chromedriver 2.43 上是正常的
- javascript - 开玩笑地模拟 localStorage 方法
- ruby - open_timeout 和 read_timeout 不起作用
- python - 如何使用 CCDT 文件、用户 ID 和密码在 Python 中连接到 IBM MQ
- c# - 为什么这个从 C# 代码中提取的 Git 不起作用
- javascript - jQuery AJAX 调用获取 HTML 响应