Рет қаралды 41,154
❗️Today I share a quick trick on how to stop unwanted responses from re-rendering a react component whose useEffect has an async function.
TLDR; Use useEffect cleanup. See the code here 👉 gist.github.com/dylan-alberta...
I ran across this problem when making an API call when a component rerendered.
---
WHO AM I: I'm Dylan, a Cloud Engineer living in Bend, Oregon. I use my background in AWS and React to make videos that enable and grow businesses.
---
🌍 My website / blog -
dylanalbertazzi.com/