Q. What is the role of the Context API in React?

  • (A) To provide a way to pass data through the component tree without props
  • (B) To handle routing
  • (C) To style components
  • (D) To fetch data from APIs
πŸ’¬ Discuss
βœ… Correct Answer: (A) To provide a way to pass data through the component tree without props
Explanation: Context API helps avoid prop drilling.
Explanation by: Mr. Dubey
Context API helps avoid prop drilling.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
69
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate