4 ms·
Show HN: I wrote a book about useEffect
- rozenmd 6y agoI've found that since the release of hooks, few developers around me use React's useEffect hook with confidence. People prefer using `// eslint-ignore` and trial-and-error over understanding what the hook actually does. This book aims to fix that, by explaining the hook's use in data fetching. By going through the examples, you'll learn: - how to use useEffect to fetch data, and avoid pesky race conditions - how to take the guesswork out of using the dependency array - how to prevent infinite re-renders through the use of useCallback and useMemo - all of the above, while also keeping ESLint happy I hope you like it, and feel free to contact me if you have any questions.