Replies: 1 comment 4 replies
-
I have exactly same question. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
RTK question. How do I do the second example in this code block https://redux.js.org/recipes/structuring-reducers/reusing-reducer-logic#customizing-behavior-with-higher-order-reducers with createReducer in typescript? I saw this https://redux-toolkit.js.org/usage/usage-with-typescript#wrapping-createslice but I don't see how to accomplish the "if (name !== counterName) return state" pattern.
For instance: say I have two redux slices that share the same set of actions but need their own slice of the same type of state. Currently I do something like this
I'm not sure how I can do that with the createReducer pattern and TypeScript.
I am stuck at this point
Beta Was this translation helpful? Give feedback.
All reactions