WHAT IS PROPS
Props are like arguments you pass to a function but there you pass them to a components .
they allows to send parent components to child components.
Props are read only - the child components cannot change.
whey:
To reuse components with different data
To make components dynamic instead of hardcoding values (change output based on input)
When:
when a child components needs data from its parents components
when you want to reuse a component with different data
when your ui should change dynamically based on inputs
*HAPPY CODING *
Top comments (0)