What is the difference between state and props in react
In React, props (short for “properties”) and state are both plain JavaScript objects that hold data that affects a component. However, there are some important differences between the two state and props: Here is an example of how props and state might be used in a simple React component: In this example, the MyComponent component … Read more