0
What is the difference between state and props in React?

Open 1 Answers 3 Views Education
What is the difference between state and props in React?

1 Answer

0

Both props and state are plain JavaScript objects. While both of them hold information that influences the output of render, they are different in their functionality with respect to component. Props get passed to the component similar to function parameters whereas state is managed within the component similar to variables declared within a function.

by (280k points)
...