7 Matching Annotations
  1. Oct 2020
  2. Oct 2019
  3. Aug 2019
    1. So far, we have used various state hooks to manage our data fetching state for the data, loading and error state. However, somehow all these states, managed with their own state hook, belong together because they care about the same cause. As you can see, they are all used within the data fetching function. A good indicator that they belong together is that they are used one after another (e.g. setIsError, setIsLoading). Let's combine all three of them with a Reducer Hook instead.