Programming/JavaScript
React App 환경셋팅 및 개념
고막고막
2019. 7. 15. 10:58
REACT는 front-end를 쉽게 구현할 수 있는 라이브러리로
node.js(Node Package Manager)와 git 환경에서 셋팅한다.
npm install -g create-react-app
node_modules : 로컬(프로젝트)의 디펜던시를 관리하는 폴더
public : index.html 파일이 들어가 있는 폴더
src : 리액트 소스가 있는 폴더
.gitignore : git으로 관리하지 않아도 되는 파일을 관리하는 파일
package.json : node 패키지 매니저(디펜던시 관리) 파일
yarn.lock : yarn이 관리하는 패키지 버전을 보관하는 파일
Components & Props
https://ko.reactjs.org/docs/components-and-props.html
Components and Props – React
A JavaScript library for building user interfaces
reactjs.org
PROP vs STATE
PROP : 단일 방향으로만 전달 가능하다
STATE : 이벤트에 의해서만 변경할 수 있다
State & LifeCycle
https://ko.reactjs.org/docs/state-and-lifecycle.html