๐ฌ (50) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ useMemo ์ useCallback ์ ๋ฌด์์ด ๋ค๋ฅธ ๊ฒ์ธ๊ฐ...... useMemo((...) => fn, deps) === useCallback(fn, deps) useMemo ๋ ๋ฉ๋ชจ์ ์ด์ ๋ ๊ฐ์ ๋ฐํํ๋ค. = ํจ์๋ฅผ ์คํํ๋ค. useCallback ์ ๋ฉ๋ชจ์ ์ด์ ๋ ํจ์๋ฅผ ๋ฐํํ๋ค. => ์์ ์๋ก์ด ํจ์๋ฅผ ๋ฐํํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์ ๊ฐ๊ฐ ๋ค๋ฅธ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ๊ฐ์ง๋ค!!!!!!!!!!!!! ๊ทธ๋์ ์ฅ์ ? 40์ผ์ฐจ ๐ฆ 40์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 10. Deploy React App Ch 11. React ๋ก ๋ง๋๋ ์ผํ๋ชฐ ํ๋ก์ ํธ Ch 10. Deploy React App ๐ SPA ํ๋ก์ ํธ ๋ฐฐํฌ ์ดํดํ๊ธฐ ๋ชจ๋ ์์ฒญ์ ์๋ฒ์ ํ๊ณ ๋ฐ์์ค๋ ํํ๊ฐ ์๋ ๋ผ์ฐํ ๊ฒฝ๋ก์ ์๊ด์์ด ๋ฆฌ์กํธ ์ฑ์ ๋ฐ์ ์คํ ๋ผ์ฐํ ์ ๋ฐ์์จ ๋ฆฌ์กํธ ์ฑ์ ์คํ ํ, ์ ์ฉ static ํ์ผ์ ์ ์ธํ ๋ชจ๋ ์์ฒญ์ index.html ๋ก ์๋ตํด ์ฃผ๋๋ก ์์ $ nvm install 10.16.3 $ npm ci $ npm run build ๐ serve ํจํค์ง๋ก React Web App ๋ฐฐํฌํ๊ธฐ $ npm install serve -g $ serve -s build # -s ์ต์ ์ ์ด๋ค ๋ผ์ฐํ ์ผ๋ก .. 39์ผ์ฐจ ๐ 39์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 8. React Testing Ch 9. React Advanced Ch 8. React Testing ๐ JavaScript Unit Test & Jest ์ฌ์ฉํ๊ธฐ https://jestjs.io/docs/expect Expect · Jest When you're writing tests, you often need to check that values meet certain conditions. expect gives you access to a number of "matchers" that let you validate different things. jestjs.io https://github.com/testing-.. 38์ผ์ฐจ ๐ 38์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 7. Hooks & Context Ch 6. Hooks & Context ๐ Basic Hooks : ์ปดํฌ๋ํธ์ state์ ๊ด๋ จ๋ ๋ก์ง์ ์ฌ์ฌ์ฉํ ์ ์๋ค. Functional Component != Stateless Componet because state hooks https://ko.reactjs.org/docs/hooks-intro.html useState: state ๋ฅผ ๋์ฒดํ ์ ์๋ค. // ./App.js ... import Example1 from "./components/Example1"; import Example2 from "./components/Example2"; import Example3 fro.. 37์ผ์ฐจ ๐ง 37์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 6. ๋ฆฌ์กํธ ์ค์ ํ์ฉ Ch 6. ๋ฆฌ์กํธ ์ค์ ํ์ฉ ๐ HOC (Higher Order Component) : ๋ฅผ ์ธ์๋ก ๋ฐ์ ๋ฅผ ๋ฆฌํดํ๋ ํจ์ https://ko.reactjs.org/docs/higher-order-components.html ๊ณ ์ฐจ ์ปดํฌ๋ํธ – React A JavaScript library for building user interfaces ko.reactjs.org https://github.com/mridgway/hoist-non-react-statics GitHub - mridgway/hoist-non-react-statics: Copies non-react specific statics from.. 36์ผ์ฐจ ๐ผ 36์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 5. React Component Styling Ch 5. React Component Styling ๐ Style Loaders // webpack.config.js // import './App.css'; { test: cssRegex, exclude: cssModuleRegex, use: getStyleLoaders({ importLoaders: 1, sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment, modules: { mode: 'icss', }, }), sideEffects: true, }, // import styles from './App... 35์ผ์ฐจ ๐ฆฆ 35์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 4. React Router Ch 4. React Router https://reactrouter.com/ Declarative routing for React apps at any scale | React Router Version 6 of React Router is here! React Router v6 takes the best features from v3, v5, and its sister project, Reach Router, in our smallest and most powerful package yet. reactrouter.com $ npm i react-router-dom // App.js impor.. 34์ผ์ฐจ ๐ฆ 34์ผ์ฐจ Part 10. React ๋ก ์ผํ๋ชฐ ๋ง๋ค๊ธฐ (React ๊ธฐ๋ณธ) Ch 3. Creating React Project Ch 3. Creating React Project https://create-react-app.dev/ Create React App Set up a modern web app by running one command. create-react-app.dev $ npx create-react-app my-app // package.json { "scripts": { "start": "react-scripts start", // npm start (๊ฐ๋ฐ์ฉ) "build": "react-scripts build", // npm run build (ํ๋ก๋์ ์ฉ) "test": "rea.. ์ด์ 1 2 3 4 5 ยทยทยท 7 ๋ค์