Engrain by ByteRush

FND.12.04 JuniorCore — asked often

useEffect and fetching data

Comes up in: React

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

  • effects synchronise with outside systems
  • dependency arrays
  • cleanup
  • fetching with loading/error state
  • race condition on fast typing (ignore flag / AbortController)
  • "you might not need an effect"

Words you will know

effectdependency arraycleanup

What you will practise

  • search with fetch and cleanup

Interview questions this answers

  • What does the dependency array of useEffect do?