====== React.js (리액트) ====== ===== Quick start ===== * Install node.js (npm) * Install create-react-app $ npm install -g create-react-app * create app $ create-react-app * change directory into project $ cd * run project$ npm start * connect via web browser ''http://localhost:3000/'' * start with ''app.js'' file, and so on. ===== Preparings ===== {{page>public:computer:node.js#install_nodejs_on_ubuntu}} ===== Getting Started ===== ==== Hello, World ==== Hello React!
==== Concepts ==== * react * jsx(JavaScript XML) * props; * defaultProps * props.children *isSpecial * useState (@React Hooks), state * 함수형 업데이트 * useRef (@React Hooks) * useEffect (@React Hooks) * useMemo (@React Hooks) * useCallback (@React Hooks) * useReducer * cutom hooks * LifeCycle * Mount; constructor, getDerivedStateFromProps, reder, componentDidMount * Update; getDerivedStateFromProps, shouldComponentUpdate, render, getSnapshotBeforeUpdate, componentDidUpdate * Unmount; componentWillUnmount ===== References ===== * [[https://ko.reactjs.org/docs/getting-started.html|시작하기]] * [[https://developer.mozilla.org/ko/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started|React 시작하기 - Web 개발 학습하기 | MDN]] * [[https://www.taniarascia.com/getting-started-with-react/|React Tutorial: An Overview and Walkthrough]] * [[https://react.vlpt.us/|벨로퍼트와 함께하는 모던 리액트]] * [[https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi|React Developer Tools @chrome 웹 스토어]] * [[https://zivvle.tistory.com/entry/%EB%A6%AC%EC%95%A1%ED%8A%B8-%EA%B3%A0%EC%9C%A0%ED%95%9C-Key-%EA%B0%92-%EC%83%9D%EC%84%B1%ED%95%98%EA%B8%B0-uuid|리액트 고유한 Key 값 생성하기 (uuid)]]