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
Currently most of our reducers are implemented as a big switch statement, which is unwieldy and hard to read. Instead, use the handleActions() helper in redux-actions to implement the reducer as a map of action names to reducer functions.
We should follow the pattern of using the action creator function itself as the map key, allowing us to avoid hard-coding string literals containing the action name.
See the console reducer for an example of the desired implementation.
Testing
Since our goal here is merely to refactor the reducers, not change their behavior, all existing tests should pass after a reducer is refactored.
However, it might make sense to also port the reducer test to Jestafter completing the refactor and confirming that the old tests pass with the new reducer implementation (this should be in separate commits).
Reducers to migrate
clients
compiledProjects
console
currentProject
errors
googleClassroom
index
projects
resizableFlex
ui
user
The text was updated successfully, but these errors were encountered:
Currently most of our reducers are implemented as a big
switch
statement, which is unwieldy and hard to read. Instead, use thehandleActions()
helper inredux-actions
to implement the reducer as a map of action names to reducer functions.We should follow the pattern of using the action creator function itself as the map key, allowing us to avoid hard-coding string literals containing the action name.
See the console reducer for an example of the desired implementation.
Testing
Since our goal here is merely to refactor the reducers, not change their behavior, all existing tests should pass after a reducer is refactored.
However, it might make sense to also port the reducer test to Jest after completing the refactor and confirming that the old tests pass with the new reducer implementation (this should be in separate commits).
Reducers to migrate
clients
compiledProjects
console
currentProject
errors
googleClassroom
index
projects
resizableFlex
ui
user
The text was updated successfully, but these errors were encountered: