- Community aggregator
- Country: United States
React useContext Hook – Interview Questions and Answers
Q1. What is useContext in React? useContext is a React Hook used to share data between components without passing props manually through every level of the component tree. Example: We can share cart data, user information, theme, and authentication status using useContext. Q2. Why do we use…