Which component type in the Context API is responsible for providing data to its descendants?

  • Context Consumer
  • Context Provider
  • Context Renderer
  • Context Subscriber
In the Context API, the component responsible for providing data to its descendants is the Context Provider. The Context Provider wraps the part of the component tree where you want to make data available to other components. Consumers, on the other hand, read this data. The Provider sets up the context, and the Consumers access it.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *