react-native-gifted-chat
react-native-gifted-chat copied to clipboard
how to force re-render chatFooterView?
Hi, im using state to control ChatFooterView like this:
const [replyMessage, setReplyMessage] = React.useState()
When apply replyMessage, i want to show replyView but not working
renderChatFooter={renderReply}
const renderReply = (props) => {
console.log('renderReply', replyMessage)
if(replyMessage){
return <ChatReply {...props}/>
}
return null
}
Here is chatReply
export function ChatReply(props) {
const { theme } = React.useContext(ThemeContext)
return (
<Animatable.View animation='fadeInUp' duration={400} easing='ease-in-out-back' style={{
}}>
<View
style={{
backgroundColor: 'lightgray',
width: '100%',
flex: 1,
height: 60,
borderTopLeftRadius: 8,
borderTopRightRadius: 8,
}}>
</View>
</Animatable.View>
)
}
i put the log to check if reply is called, then the log is show, but my ChatReply does not show, can u help?