Fang Jin
May 9, 2021

--

Thanks for the article.

What about the callback function in `useEffect(callback)`. Is this function cached? Because if it's not, why does `useEffect` not create this function every time as well ?

Why nobody write, `useEffect(useCallback(() => {}))`

Just curious, thanks.

--

--

Fang Jin
Fang Jin

Written by Fang Jin

Front-end Engineer, book author of “Designing React Hooks the Right Way” and "Think in Recursion"

No responses yet