⇠ chan.dev/ lessons/ reactholiday / 2019

Dispatch Async Actions in useReducer

I want to hide the fetch-y implementation details behind named actions. Let’s move move our async onClick handler into a useReducer action…

https://codesandbox.io/s/react-holiday-day-19-5g4oc