extraData isn't working
See original GitHub issueIssue Description
RenderMessage function isn’t running when data in extraData changes.
Steps to Reproduce / Code Snippets
<GiftedChat
messages={this.props.messages}
renderAvatar={null}
onSend={this.onSend}
user={{
_id: this.props.user._id,
}}
extraData={this.state.selectedMessages}
renderSend={this.renderSend}
renderActions={this.renderCustomActions}
keyboardShouldPersistTaps="never"
renderMessage={this.renderMessage}
renderChatFooter={this.renderChatFooter}
renderInputToolbar={this.renderInputToolbar}
renderComposer={this.renderComposer}
/>
Expected Results
I want renderMessage function to run when selectedMessages in state updates.
Additional Information
- Nodejs version: 10.0.0
- React version: 16.6.3
- React Native version: 0.58.5
- react-native-gifted-chat version: 0.7.2
- Platform(s) (iOS, Android, or both?): Android
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:6
Top Results From Across the Web
React Native Flatlist extraData not working redux data changed
The reason it's not updating is because you're not returning a new array. The reference is same. Return the updated state like return ......
Read more >extraData hook not working for one of 2 flatLists-React Native
Coding example for the question extraData hook not working for one of 2 flatLists-React Native.
Read more >Help getting extradata to cause flatlist to update : r/reactnative
So I have Task, and task are created in a new component. They simply add the information to the array that stores all...
Read more >24/7 Backup Internet and Extra Data - Ring Help
24/7 Backup Internet 1 is a feature in Ring Protect Pro that provides internet connection to wifi-enabled devices during an internet or power...
Read more >5 extra hours free data not working - Fido Community
To use extra data, to see your line remaining data etc etc. If you are not selected to your own number you will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My list only re render went I press the first or last message, other messages have no effect. Pls help
shouldUpdateMessage prop is the way to go… it is just like react shouldComponentUpdate lifecycle method