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

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton