3 ms·
Show HN: UseEffect by Example – eBook
- rozenmd 6y agoJust launching v1 of my eBook useEffect By Example here on HN. I'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 on Twitter if you have any questions.