State Management · Junior · Question 24 of 75

Can a component use several contexts at once?

Explanation

const theme = useContext(ThemeContext); const user = useContext(UserContext); is normal. Splitting unrelated values into separate contexts also reduces unnecessary re-renders.

Further reading

Problem with a question

State Management · Junior · question 24

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