250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- solidity
- 삶
- SSR
- 기준
- middleware
- error
- Redux
- nextJS
- node.js
- CSS
- CLASS
- useState
- tailwindcss
- API
- typeScript
- Ethereum
- REACT
- hardhat
- web
- express.js
- evm
- concept
- Interface
- JavaScript
- graphQL
- Props
- HTML
- blockchain
- built in object
- bitcoin
Archives
- Today
- Total
ReasonJun
React : Passing values to components through props 본문
728x90
Props is short for properties. When we need to deliver a value to a component, we use props.
- When using ‘Hello’ component in App component, it delivers the value of name.
2. Props delivered to components can be inquired through parameters. Props is delivered in the form of an object, and if you want to look up the ‘name’ value, you can look up ‘props.name’.
Multiple props, unstructured assignments
Set default to defaultProps
If you want to set the default value to use when you do not specify props for a component, you can set the value defaultProps for the component.
728x90
'Frontend > React' 카테고리의 다른 글
React : Conditional render (0) | 2023.06.11 |
---|---|
React : Function and Class Components / Rendering a Component / Composing Components / Extracting Components / Props are Read-Only (0) | 2023.06.11 |
React : Pros and Cons of SPA (2) | 2023.06.11 |
React : SPA (1) | 2023.06.11 |
React : lifecycle (0) | 2023.06.11 |
Comments