Custom Hooks and Context

Pull shared logic into your own hooks and share state across a page with context and reducers.

  1. 01

    Build a useToggle Hook

    • easy
    • Code
  2. 02

    Build a useCounter Hook with Limits

    • easy
    • Code
  3. 03

    Build a usePrevious Hook

    • easy
    • Code
  4. 04

    Share a Theme with Context

    • easy
    • Code
  5. 05

    Build a useOnClickOutside Hook

    • medium
    • Code
  6. 06

    Share the Signed-in User

    • medium
    • Code
  7. 07

    Translate with a Language Context

    • medium
    • Code
  8. 08

    Track a Request with a Reducer

    • medium
    • Code
  9. 09

    Share a Cart with the Header

    • medium
    • Code
    • Pro
  10. 10

    Build a useInterval Hook

    • hard
    • Code
    • Pro
  11. 11

    Move Cards on a Kanban Board

    • hard
    • Code
    • Pro