| Start |
|---|
| PropTypes The Multiple PropTypes You can also have multiple Children Props There is also a special props called Instead, you should do this then you can do this in Recipe's render: You will have a And the propType of children is |
| What are props? Props are used to transfer data from parent to child component. Props are read only. Child component can only get the props passed from parent using this.props.keyName. Using props one can make his component reusable. |
| Use of props Once setup is completed. Copy the code below to Using props one can make his component generic. For example, you have a Button component. You can pass different props to that component, so that one can place that button anywhere in his view. |
| Default Props defaultProps allows you to set default prop values for your component. In the below example if you do not pass the name props, it will display John otherwise it will display the passed value |
Read Article
https://develop.horje.com/learn/1434/reference