react-native-gifted-chat icon indicating copy to clipboard operation
react-native-gifted-chat copied to clipboard

how to force re-render chatFooterView?

Open fukemy opened this issue 3 years ago • 0 comments

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?

fukemy avatar Apr 29 '22 10:04 fukemy