The State Reducer Pattern using React hooks
#todo
- End user does an action
- Dev calls dispatch
- Hook determines the necessary changes
- Hook calls dev's code for further changes 👈 this is the inversion of control part
- Hook makes the state changes
https://kentcdodds.com/blog/the-state-reducer-pattern-with-react-hooks
[[20210705094040-inversion-of-control]]
[[designpatterns]]
[[react]]
[[reactapi]]
[[reacthooks]]