๋ฆฌ์กํธ8 [React] favicon ๋ณ๊ฒฝํ๊ธฐ react-create-app์ผ๋ก ํ๋ก์ ํธ๋ฅผ ์์ํ๋ฉด, ๋ธ๋ผ์ฐ์ ํญ์ ์ผ์ชฝ์ ์๋ favicon์ด ๋ฆฌ์กํธ ๋ก๊ณ ๋ก ๋ฌ๋ค. (์๋ ๊ทธ๋ฆผ์์ ํฌ๋กฌ ๋ก๊ณ ์์น์ ๋ง์ด๋ค) ๋ด ์๋น์ค์ ๋ง๋ ์์ด์ฝ์ ๋์์ธํด์ ๊ทธ๊ฒ์ผ๋ก ๋ณ๊ฒฝํ๊ณ ์ถ์ ๋๋ ์๋์ ๊ฐ์ด ํ๋ฉด ๋๋ค. 1. ์์ด์ฝ ๋์์ธ ํ๊ธฐ ์ผ๋จ ๋์์ธ ํ ์์ด์ฝ ํ์ผ์ด ์์ด์ผ ํ๋ค. 2. favicon์ผ๋ก ๋ง๋ค๊ธฐ https://www.favicon-generator.org/ Favicon & App Icon Generator Upload an image (PNG to ICO, JPG to ICO, GIF to ICO) and convert it to a Windows favicon (.ico) and App Icons. Learn more about favicons.. 2022. 10. 24. [React] Hooks & Custom Hooks Hook์ ๋ฆฌ์กํธ ๋ฒ์ 16.8๋ถํฐ ์๋ก ์ถ๊ฐ๋ ์์๋ก, class๋ฅผ ์์ฑํ์ง ์๊ณ ๋ state์ ๋ค๋ฅธ react ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์๋๋ก ํด์ค๋ค. ๋ฆฌ์กํธ๋ก ๊ฐ๋ฐ์ ํ ๋ ์์ฃผ ์ฌ์ฉํ๋ useState() ์ useEffect()๋ Hook์ ํ ์ข ๋ฅ์ด๋ค. Hook์ ์ฌ์ฉํ๋ ์ด์ hook์ ์ฌ์ฉํ์ง ์๊ณ ๋ฆฌ์กํธ๋ก ๊ฐ๋ฐ ์, ํฌ๊ฒ 3๊ฐ์ง์ ๋ฌธ์ ์ ์ด ์๋ค๊ณ ํ๋ค. 1. ์ปดํฌ๋ํธ ์ฌ์ด์์ ์ํ ๋ก์ง์ ์ฌ์ฌ์ฉํ๊ธฐ ์ด๋ ค์ ํ์ง๋ง hook์ ์ฌ์ฉํ๋ฉด ์ํ ๊ด๋ จ ๋ก์ง์ ์ฌ์ฌ์ฉํ ์ ์์ผ๋ฉฐ, ๋ ๋ฆฝ์ ์ธ ํ ์คํธ์ ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํด์ง๋ค. 2. ๋ณต์กํ ์ปดํฌ๋ํธ๋ค์ ์ดํดํ๊ธฐ ์ด๋ ค์ ์๋ก ๋น์ทํ ์ผ์ ํ๋ ์์ ํจ์์ ๋ฌถ์์ผ๋ก ์ปดํฌ๋ํธ๋ฅผ ๋๋๋ ๋ฐฉ๋ฒ์ ์ฌ์ฉํ ์ ์๋ค. 3. class๋ ์ฌ๋๊ณผ ๊ธฐ๊ณ๋ฅผ ํผ๋์ํด class๋ฅผ ์ฌ์ฉํ.. 2022. 9. 19. [React] Carousel (๋ฐ์ํ ์ด๋ฏธ์ง / ๊ฐ๋ก ์คํฌ๋กค) ์ฌ์ฉ๋ฒ (JS) http://react-responsive-carousel.js.org/ http://react-responsive-carousel.js.org/ React Responsive Carousel Storybook Check it out these cool demos created using storybook. The source code for each example is available here. Summary Installing npm install react-responsive-carousel --save Demo Carousel Code: Contributing Please, feel fre react-responsive-carousel.js.org ๋ฌผ๋ก ์ง์ ๊ตฌํํ ์๋ ์์ง๋ง.. ์ ๋์์๋ .. 2022. 8. 23. [React] effects ์ํ ์ง ์ค๋๋์ ์ ๊น ๋ณต์ต ์ญ๊ณ ... create-react-app์ผ๋ก ์์ ํ ๋์ ํฌ์ธํธ๋ "๋ถํ ํ๊ณ " "์ ๋ณตํ๋' ๊ฒ create-react-app์ css ์ฝ๋๋ฅผ javascript ์ค๋ธ์ ํธ๋ก ๋ณํ์์ผ์ค ๋ฌด์์์ ์ธ ๋๋ค class ์ด๋ฆ์ ๊ฐ์ง ์ปดํฌ๋ํธ๋ฅผ ๋ถ๋ฆฌํด์ ๋ ๋ฆฝ์ ์ผ๋ก ๋ง๋ค ์ ์์ ๊ธฐ์ตํด๋ ๊ฒ state๊ฐ ๋ณํํ ๋ ๋ชจ๋ component์ ์ฝ๋๋ ๋ค์ ์คํ๋๋ค. ์ฒ์ ํ๋ฒ๋ง ์คํ๋๊ณ ๊ทธ ๋ค์์๋ ์คํ๋์ง ์๊ฒ ํ๋ ค๋ฉด? useEffect 2๊ฐ์ argument๋ฅผ ๊ฐ์ง 1๋ฒ argument "effect" : ๋ฑ ํ๋ฒ๋ง ์คํํ๊ณ ์ถ์ ์ฝ๋ 2๋ฒ argument "deps" : dependency. ์ด ๋ถ๋ถ์ด ๋ณํํ ๋ ์ฝ๋๋ฅผ ์ฌ์คํ์ํด ์ฝ๋๊ฐ ๋ฑ ํ๋ฒ๋ง ์คํ๋ ์ ์๋๋ก ๋ณดํธํด์ค [] ํน์ ์กฐ.. 2022. 7. 19. ์ด์ 1 2 ๋ค์