What is the primary mechanism to pass data from a parent to a child component in React?

  • Context API
  • Props
  • Redux
  • State
The primary mechanism to pass data from a parent to a child component in React is through props (short for properties). Props allow you to pass data from a parent component to a child component as read-only properties. While React provides other mechanisms like state, Redux, and Context API for managing and sharing data, props is the most direct and common method for parent-child communication.
Add your answer
Loading...

Leave a comment

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