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
Using ImmerReducer with TypeScript is such a pleasant experience, everything is type-safe, and with some extra work you can have the compiler enforce immutability on the state outside of producers.
I built a little React based calendar app that uses two ImmerReducers for state management. This example provides a useful foundation to build a more complex app made up of several small reducers:
Using ImmerReducer with TypeScript is such a pleasant experience, everything is type-safe, and with some extra work you can have the compiler enforce immutability on the state outside of producers.
I built a little React based calendar app that uses two ImmerReducers for state management. This example provides a useful foundation to build a more complex app made up of several small reducers:
https://github.com/gamedevsam/calendar-appointments
The magic sauce are these files in the Redux directory:
And of course the connector components:
One other noteworthy thing is the immutable generic type, which allows TypeScript to enforce immutability at compile time: src/types/immutable.ts
The text was updated successfully, but these errors were encountered: