์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ๋ฐ์ดํฐ๋ถ์
- sap
- ๋ฆฌ์กํธ
- ์๋ง์กด์น์๋น์ค
- github
- ์๋ฐ์คํฌ๋ฆฝํธ
- AI
- nlp
- ํ ์คํธ๋ง์ด๋
- ์๊ณ ๋ฆฌ์ฆ
- react
- ๊นํ๋ธ
- ํ๋ธ๋ฃจ
- ๋ฐฑ์ค
- DFS
- tableau
- abap
- erp
- ์ธ๊ณต์ง๋ฅ
- Git
- ๋ฐ์ดํฐ ๋ถ์
- ์ฝ๋ฉํ ์คํธ
- ํ ์คํธ๋ถ์
- ๋ฅ๋ฌ๋
- ์์ฐ์ด์ฒ๋ฆฌ
- ์ฝํ
- ํ์ด์ฌ
- ๋น ๋ฐ์ดํฐ
- ํ๋ธ๋ก
- AWS
- Today
- Total
๋ชฉ๋ก์๋ฐ์คํฌ๋ฆฝํธ (9)
DATA101

๐ ๋ค์ด๊ฐ๋ฉฐ React Hook์ ํ์ฉํ์ฌ ์น ํ์ด์ง์์ ์นดํก ํ๋ฌ์ค ์น๊ตฌ ์ฑ๋๊ณผ 1:1 ์ฑํ ์ ์ฐ๊ฒฐํ๋ ๊ธฐ๋ฅ์ด ํฌํจ๋ ๋ฒํผ์ ๋ง๋๋ ๊ณผ์ ์ ์๊ฐํฉ๋๋ค. ๐ ๋ชฉ์ฐจ 1. ์นดํก ํ๋ฌ์ค ์น๊ตฌ ์์ฑ 2. ์นดํก ์ฑ ์๋น์ค ์์ฑ 3. ์นด์นด์ค SDK ์ถ๊ฐ 4. ์ฑํ ๊ธฐ๋ฅ ์ถ๊ฐ 5. ๊ฒฐ๊ณผ 1. ์นดํก ํ๋ฌ์ค ์น๊ตฌ ์์ฑ ์ฐ๊ฒฐํ ์นดํก ํ๋ฌ์ค ์น๊ตฌ ์ฑ๋์ ์์ฑํฉ๋๋ค. https://center-pf.kakao.com/ ์นด์นด์คํก ์ฑ๋ ๊ด๋ฆฌ์์ผํฐ ์ธ์์ ๋ชจ๋ ๋น์ฆ๋์ค๋ฅผ ์์ฑํฉ๋๋ค. ์ง๊ธ ๋ฌด๋ฃ๋ก ๋ง๋ค์ด ์๋ก์ด ๋น์ฆ๋์ค ํ์ ๊ฒฝํํ์ธ์. center-pf.kakao.com 2. ์นดํก ์ฑ ์๋น์ค ์์ฑ ์๋ ๋งํฌ๋ฅผ ํตํด ์นดํก ์ฑ ์๋น์ค๋ฅผ ์์ฑํฉ๋๋ค(๊ทธ๋ฆผ 1). https://developers.kakao.com/console/app ์นด..

๐ ํ ์คํธ์ฉ ์ซ์ 100์กฐ๋ฅผ ์ค๋นํด ๋ดค์ต๋๋ค. let testNum = 100000000000000; ์ซ์ํ ๋ณ์๋ฅผ ์ฝ๋ ๋งจ ์์ ์ ๋ ฅํด ์ค๋๋ค. [Number].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') โ ์คํ ๊ฒฐ๊ณผ ์๋์ ๊ฐ์ด ์ ์์ ์ผ๋ก ์ฝค๋ง๋ฅผ ๋ถ์ฌ์ค ๊ฒ์ ํ์ธํ์ค ์ ์์ต๋๋ค. ํฌ์คํ ๋ด์ฉ์ ์ค๋ฅ๊ฐ ์์ ๊ฒฝ์ฐ ๋๊ธ ๋จ๊ฒจ์ฃผ์๋ฉด ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค. ๊ทธ๋ผ ์ค๋๋ ํ๋ณตํ ํ๋ฃจ ๋ณด๋ด์๊ธธ ๋ฐ๋๋๋ค๐ ๊ณ ๋ง์ต๋๋ค.

โ๏ธ์๋ฌ ์ํฉ return์์ ์๋์ ๊ฐ์ด ์ฝ๋ ์์ฑ ํ ์คํ ์ ์๋ฌ ๋ฐ์ return ( {function} ) ๐์๋ฌ ๋ฉ์์ง Functions are not valid as a React child. This may happen if you return a Component instead of from render. Or maybe you meant to call this function rather than return it. โ ํด๊ฒฐ์ฑ ๋ค์๊ณผ ๊ฐ์ด ํจ์๋ช ๋ค์ ๊ดํธ ๋ถ์ฌ์ฃผ๋ฉด ํด๊ฒฐ๋ฉ๋๋ค. return ( {function()} ) ํฌ์คํ ๋ด์ฉ์ ์ค๋ฅ๊ฐ ์๋ค๋ฉด ์๋์ ๋๊ธ ๋จ๊ฒจ์ฃผ์ธ์. ๊ทธ๋ผ ์ค๋๋ ์ฆ๊ฑฐ์ด ํ๋ฃจ ๋ณด๋ด์๊ธธ ๋ฐ๋๋๋ค :) ๊ณ ๋ง์ต๋๋ค๐

Step 1. ๋๋ ํ ๋ฆฌ ์ ๊ทผ ํฐ๋ฏธ๋์ ํตํด package-lock.json๊ณผ node_modules ํด๋๊ฐ ์์นํ ๋๋ ํ ๋ฆฌ๋ก ์ด๋ํฉ๋๋ค. Step 2. package-lock.json ์ญ์ rm -rf package-lock.json Step 3. node_modules ์ญ์ rm -rf node_modules Step 4. npm ๋ชจ๋ ์ฌ์ค์น npm install ํฌ์คํ ๋ด์ฉ์ ์ค๋ฅ๊ฐ ์๋ค๋ฉด ์๋์ ๋๊ธ ๋จ๊ฒจ์ฃผ์ธ์. ๊ทธ๋ผ ์ค๋๋ ์ฆ๊ฑฐ์ด ํ๋ฃจ ๋ณด๋ด์๊ธธ ๋ฐ๋๋๋ค :) ๊ณ ๋ง์ต๋๋ค๐

๐ฅ ๋ชฉํ JavaScript์ HTML์ ํ์ฉํ์ฌ ๊ฐ๋จํ Interactive Web ๊ธฐ๋ฅ์ ๊ตฌํํด ๋ณธ๋ค. ์์ ๊ฐ๋จํ ์์ ๋ฅผ ์ค์ตํด ๋ด ๋๋ค. HTML์ ํ์ฉํด ๋ฒํผ UI๋ฅผ ์์ฑํ๊ณ ์น์ ์ถ๋ ฅํ๊ณ , JavaScript๋ฅผ ํตํด ์ฌ์ฉ์๊ฐ ๋ฒํผ์ ํด๋ฆญํ๋ ๊ฒ์ ๊ฐ์งํ์ฌ ํด๋ฆญ ํ์๋ฅผ ์ค์๊ฐ์ผ๋ก ์ ๋ฐ์ดํธํ๋ ๊ฒ์ ๊ตฌํํด ๋ด ์๋ค. ์ค์ต ์ฝ๋ index.html Total Click: 0 ๋ฒํผ ์คํ๊ฒฐ๊ณผ ๋ฒํผ ํด๋ฆญ ์ ์ ๋๋ค. ์๋์ ๊ฐ์ด ๋ฒํผ์ ํด๋ฆญํ๋ฉด ์น ํ์ด์ง ๋ฐ ์ฝ์์ ํด๋ฆญ ํ์๊ฐ ์ถ๋ ฅ๋๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค. JavaScript์ HTML๋ฅผ ํ์ฉํ์ฌ ๊ฐ๋จํ Interactive Web ๊ธฐ๋ฅ์ ๊ตฌํํด ๋ดค์ต๋๋ค. ํฌ์คํ ๋ด์ฉ์ ์ค๋ฅ๋ ์ง๋ฌธ์ด ์๋ค๋ฉด ๋๊ธ ๋จ๊ฒจ์ฃผ์๋ฉด ๊ฐ์ฌ๋๋ฆฌ๊ฒ ์ต๋๋ค. ๊ณ ๋ง์ต๋๋ค :)

๐ฅ ๋ชฉํ ์๋ฐ์คํฌ๋ฆฝํธ(๋ฆฌ์กํธ)์์ Promise์ ์ญํ ๊ณผ ์ํ 3๊ฐ์ง์ ๋ํด ์ดํดํ๋ค. ๐ ๋ชฉ์ฐจ 1. Promise๋ ๋ฌด์์ธ๊ฐ? 2. Promise์ ์ญํ 3. Promise์ ์ํ(State) 3.1. Pending(๋๊ธฐ) 3.2. Fulfilled(์ดํ) 3.2.1. ์๊ฐ 3.2.2 Promise ๊ฐ์ฒด ์ฐ๊ฒฐ 3.3. Rejected(์คํจ) 3.3.1. ์๊ฐ 3.3.2. ํ์ฉ ์์ 1. Promise๋ ๋ฌด์์ธ๊ฐ? JavaScript(React)์์ Promise๋ ๋น๋๊ธฐ ์ฒ๋ฆฌ์ ํ์ฉ๋๋ ๊ฐ์ฒด์ ๋๋ค. ์ฌ๊ธฐ์ ๋น๋๊ธฐ ์ฒ๋ฆฌ๋ line by line ์์ฐจ์ ์ผ๋ก ํน์ ์ฝ๋์ ์คํ์ ๋๊น์ง ๊ธฐ๋ค๋ฆฌ์ง ์๊ณ ๋ค์ ์ฝ๋๋ฅผ ์ ์ ์ ์ผ๋ก ์ฒ๋ฆฌํ๋ ๊ฒ์ ์๋ฏธํฉ๋๋ค. 2. Promise์ ์ญํ Promise๋ ์ฃผ๋ก ์น ์๋น์ค ..

๐ก ๋ชฉํ JavaScript์์ ๋ฐฐ์ด ์ธ๋ฑ์ฑ์ ํตํด ์์๋ฅผ ์ถ๋ ฅ, ์ ๊ฑฐ, ์ถ๊ฐํ๋ ๋ฐฉ๋ฒ์ ๋ํด ํ์ตํ๋ค. 1. slice ํจ์: ํน์ ๊ตฌ๊ฐ ์ธ๋ฑ์ค์ ์์ ๋ฐํ ํจ์ ์ํ ๋ฐฐ์ด.slice(์์ ์ธ๋ฑ์ค, ๋ ์ธ๋ฑ์ค) slice ํจ์๋ ํน์ ๊ตฌ๊ฐ์ ์ธ๋ฑ์ค์ ํด๋นํ๋ ์์๋ฅผ ๋ฐํํฉ๋๋ค. 2๊ฐ์ ์ ์ํ ๋งค๊ฐ๋ณ์๋ฅผ ์ ๋ฌํ๋๋ฐ ๊ฐ๊ฐ ์์ ์ธ๋ฑ์ค, ๋ ์ธ๋ฑ์ค์ ๋๋ค. ํนํ, ๋์ ์ธ๋ฑ์ค๋ ํฌํจํ์ง ์๊ธฐ ๋๋ฌธ์, ์์๋ฅผ ์ถ์ถํ๋ ๊ตฌ๊ฐ์ ์ํ์ ์ผ๋ก ํํํ๋ฉด [์์์ , ๋์ )์ ๋๋ค. ์์ ์ฝ๋ let arr1 = [1, 2, 3, 4, 5, 6, 7, 8]; let arrSlice = arr1.slice(2, 6); // [start, end) ๊ตฌ๊ฐ ์ธ๋ฑ์ฑ console.log(arrSlice); // 3, 4, 5, 6 ์..

๐ก ๋ชฉํ JavaScript์์ ๋ฐฐ์ด์ ์์ ์ถ๊ฐ/์ญ์ ํ๋ ๋ฐฉ๋ฒ์ ๋ํด ์ดํดํ๋ค. ๋ค์ด๊ฐ๋ฉฐ ๋ฐฐ์ด ์ ์ธ const arr = [80, 20, 10, 99, 1234]; ์์ ๊ฐ์ด ๋ฐฐ์ด ๊ฐ์ฒด๋ฅผ ์์ฑํ๋ ๋์์ ์ด๊ธฐํํ์ต๋๋ค. 1. concat ํจ์: ๋ฐฐ์ด ๊ฐ ๋ณํฉ let arrConcat = arr.concat(5678); console.log("arr: ", arr); // [ 80, 20, 10, 99, 1234 ] console.log("arrConcat: ", arrConcat); // [ 80, 20, 10, 99, 1234, 5678 ] consoloe.log('----------------------------'); arrConcat = arr.concat([111, 222]); console...