Engrain by ByteRush

RCT.12.03 Mid-levelCore — asked often

useFetch / useAsync with abort and cache

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

  • status union
  • abort on change/unmount
  • ignore stale responses
  • refetch
  • simple cache by key

Words you will know

—

What you will practise

  • implement with tests

Interview questions this answers

  • Implement useFetch that cancels stale requests.