What is context?

  • A JavaScript library for data visualization
  • A global object used to store application state
  • A way to pass data down to child components without using props
  • A way to pass data up to parent components without using props
Context is a way to pass data down to child components without using props. It is useful for data that needs to be accessed by many components at different levels of the component hierarchy. Context provides a way to avoid the "prop drilling" problem, where props need to be passed down through many layers of components.
Add your answer
Loading...

Leave a comment

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