Replies: 2 comments 2 replies
-
Yeah, you should never write a selector that passes the entire |
Beta Was this translation helpful? Give feedback.
-
One of the most productive discussion i have ever had! Hundreds of millions solutions came out of it. Still can't find a solution that combines all results for an endpoint based on parameter and that memoizes the results as expected. P.S. the merge option is one possible solution because it will remove the need to merge ednpoints but that requires a lot of changes in the code and may rise other problems related to merge option itself |
Beta Was this translation helpful? Give feedback.
-
I have query that fetches data from the server based on the current page. When a load more button is clicked the page param is increased and a new query is send to the server. Something like that
I have to show all pages the user loaded no matter how many they are not only the current, previous and next page but all of them.
I tried to create selector that combines all results but it doesn't memoize well and it runs on every state change
and this is how i call it
I added this so i can at least run side effects only after change in the data array but still the selector recalcutes and the component is rerender on each change in the store
Beta Was this translation helpful? Give feedback.
All reactions