Comment Comment by pcthrowaway > useEffect returns a teardown function which happens to correlate with unmount when an empty array is passed.I believe this teardown function runs on unmount whether or not the dependency array is empty. parent pcthrowaway 4 years ago
I believe this teardown function runs on unmount whether or not the dependency array is empty.