일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- promise
- Props
- 렌더링
- 컴포넌트
- 이벤트핸들링
- CSS
- 배열
- frontendstudy
- 비동기함수
- HTML
- JavaScript
- FrontendStydy
- input
- 메소드 실행
- try.. catch
- useRef
- 자바스크립트
- 리액트
- webProject
- this 객체
- typeScript
- 배열메소드
- 함수 실행
- addEventListener
- Frontend Study
- REACT
- 이벤트
- callback함수
- DOM
- useState
- Today
- Total
목록Props (2)
이다닷
props App.js import React from 'react'; import Hello from './qoffhvjxm/Hello'; import Wrapper from './qoffhvjxm/Wrapper'; function App() { return ( ); } export default App; Hello.js import React from 'react'; function Hello({ color, name, isSpecial }) { return ( { isSpecial ? * : null } 안녕하세요 {name} ); } Hello.defaultProps = { name: '이름없음' } export default Hello; Wrapper.js import React from 're..
props 이용법 {this.props.값의 이름} ex) {this.props.name} 결과 코드 import React, { Component } from 'react'; import './App.css'; class Subject extends Component { render() { return ( {this.props.title} {this.props.sub} ); } } class TOC extends Component { render() { return ( HTML CSS Javascript ); } } class Content extends Component { render() { return ( {this.props.title} {this.props.desc} ); } } class A..