-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
EnhancementImprovement to an existing featureImprovement to an existing featurePriority:HighShould be addressed soon but not criticalShould be addressed soon but not criticalType:TaskTasks tied specifically to developer operations and maintenanceTasks tied specifically to developer operations and maintenance
Description
Most of the Redux code is this package was written years ago and has not been touched since. In that time, Redux has come a long way! The bad news is that this codebase goes against a lot of the Redux Best Practices. The good news is that the newer ways of doing things are much easier and involve a lot less boilerplate.
Some things which can be improved/changed:
- Can use
createSlice
which automatically creates the action creators for a reducer so that you don't need to define a bajillion constants or define basic action creator functions. This can be tackled one "slice" at a time, as Redux Toolkit is fully compatible with old/vanilla Redux. - Can use
createAsyncThunk
to automatically dispatchpending
,error
andfulfilled
actions for each asynchronous action. - Can use
useSelector
anduseDispatch
hooks instead of theconnect
HOC.
I can do a lot of this myself, but I wanted to post it as a discussion first because I don't want to waste time rewriting code if it's not wanted.
PiyushChandra17
Metadata
Metadata
Assignees
Labels
EnhancementImprovement to an existing featureImprovement to an existing featurePriority:HighShould be addressed soon but not criticalShould be addressed soon but not criticalType:TaskTasks tied specifically to developer operations and maintenanceTasks tied specifically to developer operations and maintenance