React·100 questions

What is the Context API and what are its limitations?

Answer
Context passes data through the tree without props.
Good for theme, locale, auth.
Frequent context changes can rerender many components.
Use separate contexts and memoization.
For complex cases, a store with selectors is better.
Was this answer helpful?

More questions in this topic

Related questions from other topics