일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
- error
- built in object
- useState
- Props
- Redux
- tailwindcss
- CSS
- CLASS
- express.js
- graphQL
- 기준
- node.js
- blockchain
- SSR
- solidity
- nextJS
- evm
- JavaScript
- concept
- middleware
- HTML
- hardhat
- web
- Ethereum
- 삶
- bitcoin
- typeScript
- Interface
- REACT
- API
- Today
- Total
목록Props (4)
ReasonJun
Function and Class Components The simplest way to define component is to write a JS function : function Welcome(props) { return Hello, {props.name}; } This function is a valid React component because it accepts a single “props” (which stands for properties) object argument with data and returns a React element. We call such components “function components” because they are literally JS function...

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 assignmen..
React.Component / Component In React, a class is a way to define a component using ES6 class syntax. It allows you to create reusable components with encapsulated state and behavior. React class components are based on the JavaScript class keyword and are an alternative to functional components. To define a class component in React, you typically extend the base Component or **React.Component** ..
In React, both state and props are used to manage and pass data in components, but they serve different purposes. State: State is an internal data storage specific to a component. It represents the mutable data that can be changed over time. State is managed and controlled by the component itself. When state changes, the component re-renders to reflect the updated state. State is typically initi..