State Management · Junior · Question 8 of 75

What is "local" (component) state and when is it enough?

Explanation

Most UI state is local: whether a dropdown is open, an input's text, the active tab. Keep state as close as possible to where it's used, and lift it up or move it into a store only when several distant components need it.

Further reading

Problem with a question

State Management · Junior · question 8

Test yourself

Take the State Management · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz