We are a community of Software Developers who can help you with your programming related questions. We also post articles about Programming and Technology that you might find helpful.

[SOLVED] When is useEffect cleanup called?

Issue I’m trying to learn about react’s useEffect cleanup. I came across this example on how to use cleanup. (reference: https://blog.logrocket.com/understanding-react-useeffect-cleanup-function/). const [data, setData] = useState({}) useEffect(() => { // set our variable to true let isApiSubscribed = true; axios.get(API).then((res)

Continue reading
Next Posts