React native 反应本机-天才聊天信息问题

React native 反应本机-天才聊天信息问题,react-native,react-native-gifted-chat,React Native,React Native Gifted Chat,我正在使用react native gifted chat版本“^0.16.3”,但每次收到新消息时,它只会更新最后2条消息。如何更新新消息的完整聊天列表?这是正确的方法吗 <View style={{ backgroundColor: 'white', padding: 10, width: "85%", bo

我正在使用react native gifted chat版本“^0.16.3”,但每次收到新消息时,它只会更新最后2条消息。如何更新新消息的完整聊天列表?这是正确的方法吗

<View style={{
                    backgroundColor: 'white',
                    padding: 10,
                    width: "85%",
                    borderRadius: 5,
                    shadowColor: '#000',
                    shadowOffset: { width: 0, height: 0 },
                    shadowOpacity: 0.4,
                    shadowRadius: 1,
                    elevation: 5
                }}>
                    {/* <Text color={'black'} bold size={'4.4%'} style={{ paddingLeft: 10 }} >Client wants to hire you</Text> */}
                    <Bubble
                        {...item}
                        allowFontScaling={false}
                        wrapperStyle={{
                            right: {
                                backgroundColor: Theme.darkSkyBlue,
                                width:'100%'
                            },
                            left: {
                                backgroundColor: Theme.white,
                                width:'100%'
                            }
                        }}
                    />
                    { !answered && type === "button" && (
                        <Row style={{width:'100%'}}>
                            <Btn style={{width:'48%'}} onPress={() => requestOpportunities(State.TrainerHire, requestId, _id)} yes>
                                <Btn.Text allowFontScaling = {false}>YES</Btn.Text>
                            </Btn>
                            <Btn style={{width:'48%'}} activeOpacity={0.3} onPress={() => requestOpportunities(State.TrainerAccept, requestId, _id)} packages>
                                <Btn.Text color={'blue'} allowFontScaling = {false}>NO</Btn.Text>
                            </Btn>
                        </Row>
                    )}
                </View>

{/*客户想雇用你*/}
{!回答&&type==“按钮”&&(
requestOpportunities(State.TrainerHire,requestId,_id)}是>
对
requestOpportunities(State.TrainerAccept,requestId,_id)}包>
不
)}

这是我的代码,当用户单击yes或no按钮时,它应该隐藏这些按钮。当它是最后一条消息时,它正在工作,但如果在此消息之后有一些消息,它将不工作。

您应该添加一些代码,以便我们提供帮助。