You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
You might have an idea on how to supply the data source for a flat list component. Redux state returns a list of map instead of array of object which is causing flatlist not to render
Hi,
You might have an idea on how to supply the data source for a flat list component. Redux state returns a list of map instead of array of object which is causing flatlist not to render
<FlatList keyExtractor={(item) => item.ID} style={{ backgroundColor: Colors.white, paddingHorizontal: 15 }} data={this.state.listings} extraData={this.state.listings} // renderItem={this.renderUserGroup} renderItem={({ item }) => ( <View> <Text>test</Text> </View> )} />
`const mapStateToProps = (state) => {
// console.log('state.listings.get(listings)', state.listings.get('listings'))
return {
fetching: state.listings.get('fetching'),
listings: state.listings.get('listings'),
}
}
const mapDispatchToProps = (dispatch) => {
return {
getListings: () => dispatch(ListingActions.listingRequest()),
}
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(AllListingScreen)`
console log of data shows its a list
Appreciate if you can shed some light.
Thanks.
The text was updated successfully, but these errors were encountered: