๋ฐ์ํ JavaScript168 [์ํ์ฝ๋ฉ-React] Component ํ์ผ๋ก ๋ถ๋ฆฌํ๊ธฐ [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/8hGqznPGVc0?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi src ๋๋ ํ ๋ฆฌ ์์ components ๋๋ ํ ๋ฆฌ๋ฅผ ์์ฑํ๋ค. components ๋๋ ํ ๋ฆฌ ์์๋ TOC.js๋ผ๋ ํ์ผ์ ์์ฑํ๋ค. TOC.js ํ์ผ์๋ค๊ฐ App.js์ TOC ํด๋์ค๋ฅผ ๋ณต๋ถํ๋ค. ์๋์ ์ฝ๋๋ ๊ฐ์ด ๋ณต๋ถํ๋ค. import React, { Component } from 'react'; 'react๋ผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์์ Component๋ผ๊ณ ํ๋ ํด๋์ค๋ฅผ ๋ก๋ฉํ๋ค' ๋ผ๋ ๋ป์ด๋ค. ๋ฆฌ์กํธ๋ฅผ ์ฌ์ฉํ ๋ ํ์์ ์ผ๋ก ๋ฃ์ด์ผํ๋ ์ฝ๋๋ผ๊ณ ์๊ฐํ๋ฉด ๋๋ค. TOC๋ผ๋ ํด๋์ค๋ฅผ ์ธ๋ถ์์ ์ฌ์ฉํ ๊ฒ์ ํ์ฉํ๋ ์ฝ๋๋ ์์ฑํ๋ค. export defau.. 2021. 5. 29. [์ํ์ฝ๋ฉ-React] props [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/pPCC2JWbPgk?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi Subject ํด๋์ค๋ฅผ ๋ฆฌํฉํ ๋ง ํด์ค๋ค. import './App.css'; import React, { Component } from 'react'; class Subject extends Component { render() { return ( {this.props.title} {this.props.sub} ); } } class TOC extends Component { render() { return ( HTML CSS JavaScript ); } } class Content extends Component { render() { ret.. 2021. 5. 29. [์ํ์ฝ๋ฉ-React] ์ปดํฌ๋ํธ ๋ง๋ค๊ธฐ 2 [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/J3WQKH35f0M?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi src/App.js import './App.css'; import React, { Component } from 'react'; class Subject extends Component { render() { return ( WEB world wide web! ); } } class TOC extends Component { render() { return ( HTML CSS JavaScript ); } } class Content extends Component { render() { return ( HTML HTML is HyperText.. 2021. 5. 28. [์ํ์ฝ๋ฉ-React] ์ปดํฌ๋ํธ ๋ง๋ค๊ธฐ 1 [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/wzii1e_QWgc?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi ๋จผ์ public ํด๋ ์์ pure.html๊ณผ src ํด๋ ์์ App.js๋ฅผ ์ฐ๋ค. โป์ฃผ์ : Class ์ด๋ฆ์ ๋๋ฌธ์๋ก ์์ํด์ผํ๋ค. โป์ฃผ์ : ์ปดํฌ๋ํธ ์์๋ ๋ฐ๋์ render() ํจ์๊ฐ ํฌํจ๋์ด์ผ ํ๋ค. ์ฝ์๋ก ์คํํ๋ฉด ๋ฌธ๋ฒ ์๋ฌ๊ฐ ๋ฌ๋ค. ์๋ํ๋ฉด ํ๊ทธ๋ฅผ ํํํ๋ < ๊ฐ์ ๊ฒ๋ค์ด ๊ทธ๋๋ก ๋ํ๋์๊ธฐ ๋๋ฌธ์. 2021. 5. 28. [์ํ์ฝ๋ฉ-React] ๋ฆฌ์กํธ๊ฐ ์๋ค๋ฉด [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/QG4RxNHz-bc?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi WEB world wide web! HTML CSS JavaScript HTML HTML is HyperText Markup Language. ์๋์ ์ฝ๋๋ฅผ WEB world wide web! ์ด๋ ๊ฒ ๋ฐ๊พธ๋ฉด ํจ์ฌ ๋ ํธ๋ฆฌํ ๊ฒ์ด๋ค. ์ด๊ฒ์ ํด์ฃผ๋ ๊ธฐ์ ์ด React์ด๋ค. 2021. 5. 28. [์ํ์ฝ๋ฉ-React] ๋ฐฐํฌํ๋๋ฒ [์ถ์ฒ : Youtube - ์ํ์ฝ๋ฉ] https://youtu.be/E_-ua6uCQOU?list=PLuHgQVnccGMCRv6f8H9K5Xwsdyg4sFSdi '์บ์ ๋น์ฐ๊ธฐ ๋ฐ ๊ฐ๋ ฅ ์๋ก๊ณ ์นจ'์ ๋๋ฅธ๋ค. ์ ์ฒด ์ฉ๋์ด 1.7MB๋ ๋๋ค. (React๊ฐ ๊ฐ๋ฐ์ ํธ์์ฑ์ ์ํด ์ฌ๋ฌ๊ฐ์ง ๊ธฐ๋ฅ์ ์ถ๊ฐํด๋์ create-react-app์ ํ์ผ์ ๋ฌด๊ฒ๊ฐ ์๋นํ ๋ฌด๊ฒ๋ค) ๊ทธ๋ฌ๋ ์ฉ๋์ด ์ปค์ ๋ณด์์ชฝ์ ๋ฌธ์ ๊ฐ ์๊ธธ ์ ์์ด์ ์์ฑํ ํ์๋ npm run build ๋ผ๋ ๋ช ๋ น์ด๋ฅผ ์ด๋ค. ํฐ๋ฏธ๋์ npm run build๋ฅผ ์ ๋ ฅํ๋ฉด build๋ผ๋ ํด๋๊ฐ ์์ฑ๋๋ค. build ํด๋ ์์ index.html ํ์ผ๋ก ๋ค์ด๊ฐ๋ฉด ์๋์ ๊ฐ์ด ๊ณต๋ฐฑ์ด ํ๋๋ ์๋ ๋ณต์กํ ์ฝ๋๊ฐ ์๋ค. ์ด์ ๋ create-react-app์ด inde.. 2021. 5. 28. ์ด์ 1 ยทยทยท 7 8 9 10 11 12 13 ยทยทยท 28 ๋ค์ ๋ฐ์ํ