computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
897 B
10 lines
897 B
# Props vs State |
|
|
|
Props (short for “properties”) and state are both plain JavaScript objects. While both hold information that influences the output of component render, they are different in one important way: props get passed to the component (similar to function parameters) whereas state is managed within the component (similar to variables declared within a function). |
|
|
|
Visit the following resources to learn more: |
|
|
|
- [@official@State: A Component's Memory](https://react.dev/learn/state-a-components-memory) |
|
- [@article@How to use Props in React](https://www.robinwieruch.de/react-pass-props-to-component/) |
|
- [@article@What is the difference between state and props in React?](https://stackoverflow.com/questions/27991366/what-is-the-difference-between-state-and-props-in-react) |
|
- [@article@How to update state from props in React](https://www.robinwieruch.de/react-derive-state-props/) |