Web Development · Revision notes

React.js Frontend Framework

React builds UIs from reusable components that render JSX based on props and state. The virtual DOM keeps updates efficient, hooks add state and side effects to function components, context shares global data, memoisation tunes performance, custom hooks reuse logic and React Router handles client-side navigation.

Quick revision

  • UI = f(state); JSX compiles to createElement; virtual DOM diff = reconciliation
  • props read-only, flow down; callbacks flow up; children for composition
  • never mutate state; setX(prev => ...) for dependent updates; state is a snapshot
  • useEffect deps [] / [a] / none; cleanup on re-run and unmount
  • rules of hooks: top level only
  • stable keys for lists
  • Context: memoise provider value; good for theme/auth, not high-frequency state
  • useMemo/useCallback/React.memo: only when measured or needed for stable identity
Read the full React.js Frontend Framework notes on Doubtclip →