react document
-
📒 React Document 메모Front-end/React.js 2020. 3. 12. 13:08
React document 정리 리액트는 JSX 문법을 사용한다. ➡️ 자바스크립트 내 HTML 태그들을 끼워넣는 표현 방법 HTML 친화적이라 쉬움 마크업과 로직을 분리하지 않고 UI 작성 가능 리액트 컴파일 과정에서 에러 디텍트가 가능함 무조건 사용해야 하는 것은 아니지만 권장 Props - 부모 컴포넌트가 자식 컴포넌트에게 넘겨주는 파라미터 같은 것들, Read-only하므로 변경하고자 할 때 필요한 개념이 State Components - element들이 모여 하나의 컴포넌트를 이룸, 반복되는 UI나 기능들을 효율적으로 나타내고자 컴포넌트를 단위로 분리해주는 것이 좋음 function을 class로 변환하는 방법 React.Component를 상속받는 동일한 이름의 ES6 클래스 생성함 rend..
-
[React document] tutorial : Completing the gameFront-end/React.js 2020. 2. 16. 18:57
https://reactjs.org/tutorial/tutorial.html#completing-the-game Tutorial: Intro to React – React A JavaScript library for building user interfaces reactjs.org Lifting State Up 더보기 Currently, each Square component maintains the game’s state. To check for a winner, we’ll maintain the value of each of the 9 squares in one location. We may think that Board should just ask each Square for the Square’s..