3 ms·
> My biggest complaint with the React dependency tracking is that empty dependency array [] has different behavior from null/undefined dependency array and so f
by ratww 7y ago
> My biggest complaint with the React dependency tracking is that empty dependency array [] has different behavior from null/undefined dependency array and so far I always have to look up which one I actually need
I wish they had used a constant, like "React.everytime" instead of null. I rarely want an useEffect to fire on every render, but wanting it to fire on mount is very popular, to the point a lot of people have an `useMount` custom hook...