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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello! I like redux-toolkit very much and use it on almost all my projects, but every time i'm struggling about how to structure my selectors code.
Option 1
I've noticed selectors API in rematch and it looks very convenient.
It would be great to have similar
selectors
field increateSlice
like this:And then combine all selectors in a way of
combineReducers
:combineSelectors
should transform every selector fromSelector<SliceState, Result>
toSelector<RootState, Result>
.Then usage of selectors will look like this:
Option 2
Second option is to provide more flexible version of
createEntityAdapter
with custom state shape (for example i call itcreateStateModel
):Beta Was this translation helpful? Give feedback.
All reactions