You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useMemo to memoize a value, reduce unnecessary recomputations
useCallback to memoize a function to avoid unnecessary rerenders
React.memo to memoize a component which only change when there is a change in props.
(Note: If component subscribes to Context API state then it
will rerender even if you memoize)
Code Splitting
Dynamic Imports (Dividing code into chunks and importing only when needed)
lazy loading to further improve optimization
useTransition Hook and Suspense to handle state update and displaying/handling state data
Debouncing
Technique to control the frequency at which a funciton is executed. Execute after a pause
AutoComplete, window resize, user input
Throttling
Technique to limit the execution of a function to set intervals.
AutoComplete, window resize, scrolling, button click handling.
Imgae Optimization
Covered in other repo. (image-optimization)
About
React Optimizing techniques like code splitting, debouncing, throttling