ποΈ Class Components Vs Function Components
Class Components
ποΈ What Are Hooks? πͺ
It is an optimization technique.
ποΈ useEffect is Dangerous! π§¨π£
Always avoid using useEffect if you have any alternate solution.
ποΈ How to think about useEffect
useDefect or useFootGun π¦ΆπΌπ«
ποΈ Caching API Calls
If the user is frequently navigation between pages, and on every page visit if we are triggering API calls to fetch the data for the page, the user will see a loading screen every single time.
ποΈ Race Conditions
Here on every keypress, we're triggering an API call.