React Hooks

  • useState: create a value that is preserved across renders and triggeres a re-render when it changes.
  • useRef: create a value that is preserved across renders, but won't trigger a re-render when it changes.
  • useEffect: synchronize a component with some external system and run after render.

  • useContext: get access to what was passed to a Context's Provider.

  • useReducer: create a value that is preserved across renders and triggers a re-render when it changes, using the reducer pattern. (useState in reducer pattern).
  • useMemo: cache the result of a calculation between renders.
  • useCallback: cache a function between renders.

  • useLayoutEffect: synchronize a component with some external system before the browser paints the screen.
  • useSyncExternalStore: subscribe to an external store.
  • useEffectEvent: encapsulate a side effect that synchronizes your component with some outside system.
Subscribe?

Be the first to receive insightful articles and actionable resources that help you to elevate your skills.