我想使用
react-native-gifted-chat
,然后当我尝试调用它时,它不断收到此错误:
Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render. in GiftedChat (created by Chat) in Chat (created by SceneView) in StaticContainer in EnsureSingleNavigator (created by SceneView) in SceneView (created by CardContainer) in RCTView (created by View) in View (created by CardContainer) in RCTView (created by View) in View (created by CardContainer) in RCTView (created by View) in View in CardSheet (created by Card) in RCTView (created by View) ...
import React from "react";
import { GiftedChat } from 'react-native-gifted-chat';
export default function Chat() {
return (
<View>
<GiftedChat />
</View>
)
}
如何解决这个问题?
正确阅读文档并添加所有必要的道具以使其正常工作。