React
[React] Component 추가하기
꿈나무 김땡땡
2020. 7. 26. 20:01
- Component : HTML 을 반환 하는 함수 in index.js
- JSX : js에서 HTML을 실행하고 싶을 때 사용하는 개념
potato.js
- 새로운 js 파일 만들기
- component 작성할 때 마다 import React from "react" 써줘야 함!
참고
- Changes not staged for commit:
- git add Potato.js로 새 파일 추가해야 함
- 그 후에 git commit -m "2.0 Creating first component - potato.js"
- git push origin master까지 해주면 끝!
소스
https://github.com/grace-kimm/movie_app_2020/commit/ef9ec314f98906ff748831c6e346a668c9583606
2.0 Creating first component-potato.js · grace-kimm/movie_app_2020@ef9ec31
Permalink Browse files 2.0 Creating first component-potato.js Loading branch information Showing 1 changed file with 7 additions and 0 deletions. +7 −0 src/Potato.js @@ -0,0 +1,7 @@ import React from "react"; function Potato() { return I love potato ; }
github.com