react 1.0

https://ko.reactjs.org/docs/react-component.html

React 설치
1. nodeJs 설치
2. VsCode 설치
3. yarn 설치

React 시작
1. create-react-app 글로벌 설치 $ yarn global add create-react-app

프로젝트 생성
1. {todo-list} 프로젝트 생성 $ npx create-react-app {todo-list}

프로젝트 시작
1. yarn start 

git hub 추가
** git repository 연결
git remote add origin {repository 주소}
1. git add .

git hub commit
1. git commit -m "#1.0 Creating your first React App"

git hub push
1. git push origin master


** React 라이브러리 추가
* npm i prop-types : 프로퍼티 Validation 기능
* npm install axios
* npm i gh-pages
* npm install react-router-dom : react router(페이지 이동 등)

** gib 주소 확인
git remote -v

react 프로젝트 build
1. npm run build

부모 컴포넌트로부터 자식 컴포넌트로
props 에 function()을 담아 보낼수 있다..
그러면 자식 컴포넌트에서 부모 컴포넌트의 function 을 호출할수 있다..
자식쪽에서 state를 저장하지 않고 부모쪽에서 state를 저장.... 리펙토링..??



이 블로그의 인기 게시물

ECMAScript 2009 (ES5) 이전

ECMAScript 2018

ECMAScript 2019