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
Here, when a change occurs on pendingRequests, missions are filtered again.
The solution is to make lots of small selectors and compsoe them together.
// No need to memoize selectors that compute nothingconstgetPersonId=state=>state.routing.location&&state.routing.location.state&&state.routing.location.state.personIdconstgetIsLoading=state=>!!state.pendingRequestsconstgetMissions=state=>state.missions.data// Here, missions are filtered only when 'missions.data' or 'personId' are updated.constgetFilteredMissions=>createSelector(getMissions,getPersonId,(missions,personId)=>missions.filter(getFilterMissionsById(personId)))constviewPersonSelector=createSelector(getIsLoading,getFilteredMissions,(isLoading,missions)=>({
isLoading,
missions,// etc...}))
The text was updated successfully, but these errors were encountered:
Hi redpelicans team.
Recently, i worked with reselect, and I noticed that we use wrong
An example :
Here, when a change occurs on pendingRequests, missions are filtered again.
The solution is to make lots of small selectors and compsoe them together.
The text was updated successfully, but these errors were encountered: