시작부터 에러가 나를 화나게 했다.
src\App.js
Line 4:19: 'Component' is not defined no-undef
Search for the keywords to learn more about each error.
App.js 맨 위에
import React, {Component} from 'react';
를 추가해주면 된다.
component를 불러오는 명령이라고 생각하면 될듯하다.
'react' 카테고리의 다른 글
[react] shouldComponentUpDate 사용법 (0) | 2022.11.18 |
---|---|
[react] push와 concat의 차이 +Array.from() (0) | 2022.11.18 |
[react] useState() (0) | 2022.11.16 |
[react] props를 통해 component에 값 전달하기 (0) | 2022.11.15 |
[react] Component를 생성해보자 (0) | 2022.11.15 |