Our great sponsors
- Appwrite - The open-source backend cloud platform
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Onboard AI - Learn any GitHub repo in 59 seconds
-
Actually implementing a separate interface or type per action gets clunky; that's where adding libraries can help. typesafe-actions is an easy, quality library that I've used for this on a previous project. reduxjs-toolkit is even better; it provides some more structure and several useful features. As a bonus, it includes Immer built in.
-
Actually implementing a separate interface or type per action gets clunky; that's where adding libraries can help. typesafe-actions is an easy, quality library that I've used for this on a previous project. reduxjs-toolkit is even better; it provides some more structure and several useful features. As a bonus, it includes Immer built in.
-
Appwrite
Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.
-
Destructuring and recreating the state object per action within rootReducer works (e.g., {...state, name: action.payload.name || ''}), but as your reducers get more complicated, it can become unpleasant. That's where Immer helps: Immer lets you write normal mutating code (e.g., (draftState.name = action.payload.name || ''), then it takes care of figuring out how to represent that as a new object.