We'll start from basics and get all the way to Suspense, Hooks, and advanced composition!
Each day is a 2-3 minute read with CodeSandbox and quick assignments.
Check out 2017 (below) for examples.
December 24, 2017
If you click any of the buttons in our app really fast, you’ll see this error.
setState inside the asynchronous
All works if our component is around to get updated but, when we click faster than the request can resolve, the component that requested it isn’t around to be updated.
Our app has put another component there.
When we see this error, it means we did setup that we need to clean up. We do cleanup in the componentWillUnmount lifecycle method.
I’ve updated the code below but cancellable
fetch is a whole thing and I’ve got eggnog to drink.
Happy holidays and have a Merry Christmas!
Written by chantastic.
Follow his nonsense on Twitter.