Episode 2 — React Frontend Architecture NextJS / 2.9 — Custom Hooks and Reusable Logic

2.9 — Exercise Questions: Custom Hooks & Reusable Logic

<< 2.9 Overview


Exercise 01

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 02

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 03

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 04

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 05

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 06

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 07

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 08

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 09

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 10

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 11

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 12

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 13

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 14

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 15

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 16

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 17

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 18

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 19

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 20

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 21

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 22

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 23

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 24

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 25

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 26

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 27

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 28

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 29

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 30

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 31

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 32

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 33

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 34

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 35

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 36

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 37

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 38

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 39

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 40

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 41

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 42

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 43

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 44

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 45

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 46

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 47

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 48

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 49

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 50

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 51

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 52

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 53

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 54

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 55

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 56

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 57

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 58

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 59

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 60

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 61

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 62

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 63

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 64

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 65

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 66

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 67

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 68

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 69

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 70

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 71

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 72

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 73

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 74

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Exercise 75

Implement the prompt in Vite + React + TypeScript: custom hook with tests (renderHook), pure domain module, and a thin UI component. Compare before/after line counts in README.

Deliverables: hook tests + short maintainability note.


Answers & guidance

Notes 01

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 02

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 03

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 04

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 05

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 06

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 07

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 08

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 09

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 10

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 11

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 12

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 13

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 14

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 15

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 16

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 17

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 18

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 19

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 20

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 21

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 22

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 23

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 24

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 25

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 26

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 27

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 28

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 29

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 30

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 31

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 32

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 33

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 34

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 35

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 36

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 37

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 38

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 39

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 40

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 41

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 42

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 43

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 44

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 45

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 46

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 47

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 48

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 49

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 50

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 51

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 52

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 53

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 54

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 55

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 56

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 57

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 58

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 59

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 60

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 61

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 62

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 63

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 64

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 65

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 66

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 67

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 68

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 69

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 70

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 71

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 72

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 73

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 74

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

Notes 75

  • Abort fetch.
  • Discriminated status.
  • Pure domain tested.
  • Object return API.

<< 2.9 Overview