What is the difference between state and props?
- Props are internal to a component, while state is external
- State is managed within a component, while props are passed down from a parent component
- State is read-only, while props can be changed by the child component
- There is no difference
The main difference between state and props in React is that state is managed within a component, while props are passed down from a parent component. State is used to manage a component's internal data, which can change over time, while props are used to customize a component's behavior and appearance.
Loading...