File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
exercises/07.state-reducer Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 1
1
# State Reducer
2
2
3
+ <EpicVideo url = " https://www.epicreact.dev/workshops/advanced-react-patterns/state-reducer" />
4
+
3
5
👨💼 In this exercise, we want to prevent the toggle from updating the toggle
4
6
state after it's been clicked 4 times in a row before resetting. We could easily
5
7
add that logic to our reducer, but instead we're going to apply a computer
Original file line number Diff line number Diff line change 1
1
# State Reducer
2
2
3
+ <EpicVideo url = " https://www.epicreact.dev/workshops/advanced-react-patterns/state-reducer/solution" />
4
+
3
5
👨💼 This is a powerful example of inversion of control that allows users to
4
6
overwrite our entire reducer. But it could be exhausting to users to have to
5
7
duplicate most of our reducer just to change a few things. So let's address that
You can’t perform that action at this time.
0 commit comments