Engrain by ByteRush

RCT.12.01 Mid-levelCore — asked often

Method and testing hooks

Comes up in: React, Coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • API design (inputs, return shape, stability)
  • cleanup
  • SSR safety (typeof window)
  • renderHook and fake timers
  • rubric

Words you will know

—

What you will practise

  • graded mock

Interview questions this answers

  • How do you test a custom hook?