All Questions
11 questions
0
votes
1
answer
27
views
React Native FlatList: What's more performant, passing object or passing reference to object?
I'm using MaterialTopTabNavigator with React Navigation v6. Each tab contains a FlatList. I have an array of objects that I want to render in each list, and this object is stored in Redux. I have two ...
0
votes
3
answers
606
views
react native FlatList not rerendering when data prop changes
I have a FlatList component that uses Redux (indirectly) as the source for the data prop. See below
const mapStateToProps = state => ({
rdx_activeUsers: state.profile.activeUsers,
});
...
0
votes
1
answer
41
views
My redux prop gives me empty data after access it from flatList onRefresh
If I call my reload method for the first time via useEffect it contains my data, but if I called via onRefresh at runtime, it gives me empty data.
Why? How should I save that? Is it a problem on which ...
4
votes
2
answers
11k
views
Dealing With Multiple Flatlists on the same Screen
Please help my deal with unnecessary re-renders when having two flatlists on the same screen
My screen requires two flatlists-
For HOSTS
For QUEUE
When the component mounts, I get data from the api ...
0
votes
2
answers
448
views
React Native: Saving array via AsyncStorage and retrieving it
I am trying to get an array of objects from my Redux-Store state called user and save it to async storage and use useState with the response to set the state before I retrieve it and view it with the ...
1
vote
1
answer
2k
views
React Native Flatlist gets endless loop onEndReached using redux
I am using react-native FlatList component to render a list. Im fetching dummy data from an action but my pagination is not acting as expected, it's rendering everything instantly when I'm using ...
0
votes
1
answer
1k
views
Can you pass an array of item IDs to a Flatlist?
I have a normalized redux state shape and I need to render a list of items from state.
I would prefer to pass the array of item IDs to the parent component and pass each item ID to the child ...
0
votes
1
answer
120
views
FlatList doesn't show anything when retrieving data with redux
I'm trying to use FlatList but it doesn't show anything even though the data provided to the list is correct (I console logged it above the render() and it showed the array just fine)
I tried to map ...
0
votes
2
answers
516
views
React redux updates flatlist item but turns item into an Array
I am using react redux with react native, I have a flatlist of photos. When I click the like button, I'd like to update only a single photo in the flatlist. The following code seems to work, and the ...
0
votes
1
answer
483
views
Access redux store array value on flatlist react native
I want to access image filename inside redux store array to be displayed in FlatList, but I am not sure how to access all the filename array value.
This is my Initial State
var InitialState = Record(...
2
votes
1
answer
3k
views
Refreshing React-Native FlatList when props change - using redux to manage state
Before you read ->> I did try using the extraData props in my FlatList configuration but it does not seem to work properly (maybe because I'm using Redux to manage state?)
My FlatList renders data ...