What is the difference between state and props in REACT?

Practice



Both props and state (state and props) are plain JavaScript objects. Although both hold information that influences the output of a render, they differ in their functionality with respect to the component. Props are passed to a component in a way similar to function parameters, whereas state is managed inside the component in a way similar to variables declared inside a function.
created: 2020-02-23
updated: 2026-03-10
259



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Scripting client side JavaScript, jqvery, BackBone"

Terms: Scripting client side JavaScript, jqvery, BackBone