React Props and State
What is React Props? Props mean "Properties.". It is an object that stores the value of attributes of a tag and works similarly to the HTML attributes. First take an HTML properties: <h2 id="conclusion" class="large-description"><a href="#conclusion">Conclusion</a></h2> In the above example, "h2" is an HTML tag that has multiple properties like "class", and "id". In React, < Add n1 = { 2 } n2 = { 3 } /> here n1 & n2 are the properties. Here "name" & "Age" are "props". Inside the "Child" component we can use the props like below: These are read-only components. It is an object which stores the values. Props are immutable, so it is not allowed to modify them inside the component. It is used only for passing data from one component to other. Inside the components, dynamic data can be generated based on props. What is React State? It contain...