๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Lect & Tip/node, Angular, React12

๋ฆฌ์•กํŠธ ๋ฐ์ดํŠธํ”ผ์ปค ํฌ๋งท api axios error๋ฌธ์ œ react datepicker date format axios not working ๋ฆฌ์•กํŠธ์—์„œ๋Š” jquery์šฉ ๋ฐ์ดํŠธ ํ”ผ์ปค๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค. ์•„๋‹ˆ ์‚ฌ์‹ค ๋ฆฌ์•กํŠธ์šฉ ๋ฐ์ดํŠธํ”ผ์ปค์ธ react datepicker๊ฐ€ ํ›จ์”ฌ ๊น”๋”ํ•˜๊ฒŒ ์‚ฌ์šฉ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๊ตณ์ด ์ œ์ด์ฟผ๋ฆฌ ๋ฐ์ดํŠธ ํ”ผ์ปค๋ฅผ ๋ถ™์—ฌ์•ผ ํ•  ํ•„์š”๊ฐ€ ์—†๋‹ค. ์‚ฌ์‹ค ์•„์ง ๋ฆฌ์•กํŠธ๊ฐ€ ์ดˆ์งœ๋ผ react datepicker๋ฅผ ์˜จ์ „ํžˆ ๋‹ค๋ฃจ์ง€๋Š” ๋ชปํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์ •์„์œผ๋กœ ์„ค์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์‚ฌ์‹ค ๋‚˜๋„ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋‹ค. ์ผ๋‹จ, ์‹ ๊ทœ ํ”„๋กœ์ ํŠธ์—์„œ datepicker๋ฅผ ์‚ฌ์šฉํ•  ์ผ์ด ์žˆ์–ด์„œ ์„ค์น˜ํ–ˆ๋‹ค. yarn add react-datepicker ํ˜น์€ npm i react-datepicker ๋กœ ์„ค์น˜ ํ•˜๋ฉด ๋˜๊ฒ ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ๋ฌธ์ œ๋Š” ์ด๋ ‡๊ฒŒ ์„ค์น˜ํ•˜๊ณ  import DatePicker from "react-datepicker"; ํ–ˆ์„ ๊ฒฝ์šฐ ์Šคํƒ€์ผ ๊นจ์ง ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. ์ด์œ ๋Š” ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ .. 2021. 5. 20.
์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฆฌ์•กํŠธ ๋ฉ€ํ‹ฐ ๋ ˆ์ด์•„์›ƒ connected-react-router multi layout ์ ์šฉํ•˜๊ธฐ ๋ฆฌ์•กํŠธ๋ฅผ ๋ณ„๋กœ ์ข‹์•„ํ•˜์ง€ ์•Š๋Š” 1์ธ์ด๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์–ด์ฉ” ์ˆ˜ ์—†์ด ๋ฆฌ์•กํŠธ ํ”Œ์ ์„ ํ•ด์•ผ ํ•ด์„œ ํผ๋ธ”๋ฆฌ์…” ๊ฒธ ํ”„๋ŸฐํŠธ ์—”๋“œ๋กœ ์ฐธ์—ฌ ์ค‘์ด๋‹ค. jquery๋ผ๋ฉด ๋‹จ๋ฐ•์— ๋๋‚ผ ๋ฌธ์ œ์— ๊ณ ๋ฏผํ•˜์ง€ ์•Š์•„๋„ ๋  ๋ฌธ์ œ๋“ค์ด ๋ฆฌ์•กํŠธ์—๋Š” ๋„˜์ณ๋‚œ๋‹ค. ์™œ ์“ฐ๋Š”์ง€๋Š” ์—ฌ์ „ํžˆ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ ๊นŒ๋ผ๋‹ˆ๊นŒ ๊น๋‹ค. ์ผ๋‹จ SPA ์‚ฌ์ดํŠธ์—์„œ ๋ฆฌ์•กํŠธ๊ฐ€ ํŽธํ•œ ๊ฒƒ์€ ๋Œ€์ถฉ ์ง์ž‘์€ ๋œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ SPA์‚ฌ์ดํŠธ๋ผ๊ณ ๋Š” ํ•ด๋„, ํ•œ ์‚ฌ์ดํŠธ์— ์„œ๋กœ ๋‹ค๋ฅธ ๋ ˆ์ด์•„์›ƒ์ด ์—ฌ๋Ÿฟ ์‚ฌ์šฉํ•ด์•ผ ๋˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ๋‹ค. ๋‹จ์ ์œผ๋กœ GNB, LNB๊ฐ€ ์—†๋Š” IntroํŽ˜์ด์ง€, LoginํŽ˜์ด์ง€ ๊ทธ๋ฆฌ๊ณ  ์‚ฌ์šฉ์ž ํ™”๋ฉด๊ณผ ๋‹ค๋ฅธ ๊ด€๋ฆฌ์ž ํ™”๋ฉด์˜ ๋ ˆ์ด์•„์›ƒ์€ ์„œ๋กœ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋‹ค. ์•„๋‹ˆ ๋‹ค๋ฅผ ์ˆ˜ ์žˆ๋Š” ์ •๋„๊ฐ€ ์•„๋‹ˆ๋ผ ๋Œ€์ฒด๋กœ ๋‹ค๋ฅด๋‹ค. ๊ทธ๋Ÿด ๋•Œ ๋ฆฌ์•กํŠธ ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ ˆ์ด์•„์›ƒ ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๊ฝค ๋‹ค์–‘ํ•˜์ง€๋งŒ ์ง๊ด€์ ์ด๊ณ  ์‰ฌ์šด ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•˜๊ฒ ๋‹ค... 2021. 2. 10.
React Js - Global CSS ์„ค์ • + styled reset. classNames/bind :global local css ๋™์‹œ ์ ์šฉ react module.css :global local css ๋™์‹œ ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•. classNames/bind๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์„ ๋•Œ className={cx("label","labelTst")} .labelTst๋Š” app.module.css์— ๋“ฑ๋ก. React Js - Global CSS ์„ค์ • + styled reset css ์ดˆ๊ธฐํ™”๋ฅผ ์œ„ํ•ด styled-reset ์„ค์น˜ styled-components๋Š” local๋กœ ๋™์ž‘ํ•˜๊ธฐ ๋•Œ๋ฌธ์— global ํ•œ css๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด GlobalStyles.js ์ƒ์„ฑ ์„ค์น˜ NPM์„ค์น˜ : npm install styled-reset styled-components ์–€ ์‚ด์น˜: yarn add styled-reset styled-components ์‚ฌ์šฉ Components/G.. 2021. 1. 14.
โœˆ ์œˆ๋„์šฐ์ฆˆ์—์„œ angular js choco install yarn ์„ค์น˜ / ์‹คํ–‰ ํ•˜๊ธฐ ์œ„ํ•œ ํ™˜๊ฒฝ ๊ฐ–์ถ”๊ธฐ ์—๋Ÿฌํ•ด๊ฒฐ with vscode ์•ต๊ทค๋Ÿฌjs๋Š” ์ตœ๊ทผ ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž๋“ค์—๊ฒŒ ๊ฐ€์žฅ ๊ฐ๊ด‘๋ฐ›๋Š” ํ”„๋ ˆ์ž„์›Œํฌ์ด๋‹ค.jquery๊ฐ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ผ๋ฉด angular js๋Š” ํ”„๋ ˆ์ž„์›Œํฌ๋‹ค.A๋ถ€ํ„ฐZ๊นŒ์ง€ ์ฑ…์ž„์ง€๋Š” JS์ƒํƒœ๊ณ„๋ผ๋Š” ๋œป์ด๋‹ค.์ด ๊ธ€์—์„œ๋Š” angular js ์„ค์น˜ํ•˜๊ธฐ์™€ ์•ต๊ทค๋ŸฌJS์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ํ™˜๊ฒฝ์„ ๊ฐ–์ถ”๋Š” ๊ฒƒ์— ๋Œ€ํ•ด์„œ ๋‹ค๋ฃฌ๋‹ค.ํ•„์ž๋Š” ํผ๋ธ”๋ฆฌ์…” ์ถœ์‹ ์ด๋ผ ๋ฆฌ๋ˆ…์Šค๋‹ˆ, macOS๋Š” ๊ท€์ฐฎ๋‹ค.๋”ฐ๋ผ์„œ ์œˆ๋„์šฐ์ฆˆ ํ™˜๊ฒฝ์—์„œ ์•ต๊ทค๋ŸฌJS์„ค์น˜ํ•˜๊ธฐ์™€ angular js ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ํ™˜๊ฒฝ์„ ๋‹ค๋ฃฌ๋‹ค.IDE๋กœ๋Š” ๋น„์ฃผ์–ผ ์ŠคํŠœ๋””์˜ค ์ฝ”๋“œ(vscode)๋ฅผ ๊ธฐ๋ณธ์œผ๋กœ ์„ค๋ช…ํ•˜๊ฒ ๋‹ค.IDE๋ž€ ์ดํด๋ฆฝ์Šค๋‚˜ ์—๋””ํŠธํ”Œ๋Ÿฌ์Šค ๊ฐ™์€ ์—๋””ํ„ฐ ํˆด์ด๋ผ๊ณ  ์ƒ๊ฐํ•˜๋ฉด ๋˜๊ฒ ๋‹ค. (ํ•˜์ง€๋งŒ ๋ณด๋‹ค ๊ฐ•๋ ฅํ•œ?)https://code.visualstudio.com/๋…ธํŠธ๋ถ์—๋Š” ์ดํด๋ฆฝ์Šค๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ์ง€๋งŒ ๋ฐ์Šคํฌํƒ‘์—๋Š” ์ดํด๋ฆฝ์Šค๋ฅผ ๊น”์•„ ๋†“์ง€ .. 2020. 9. 5.
๐Ÿ›ซ npm install --save classlist.js ํด๋ž˜์Šค๋ฆฌ์ŠคํŠธ.js Microsoft Windows [Version 10.0.17134.345] (c) 2018 Microsoft Corporation. All rights reserved.C:\Work\2nd-round>yarn start:client:hmr yarn run v1.12.3 $ ng serve --configuration hmr NOTICE: Hot Module Replacement (HMR) is enabled for the dev server. ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** Date: 2019-01-25T00:02:40.756Z Ha.. 2019. 2. 28.
linux killall node command use in windows taskkill /f /im node.exe Starting inspector on 127.0.0.1:9229 failed: address already in use ๐Ÿ›ซ VScode๋ฅผ ์‚ฌ์šฉํ•˜๋‹ค๋ณด๋ฉด, ๊ฐ„ํ˜น Starting inspector on 127.0.0.1:9229 failed: address already in use ์—๋Ÿฌ๊ฐ€ ๋œฐ ๋•Œ๊ฐ€ ์žˆ๋‹ค. ์ด๋ฏธ ์‚ฌ์šฉํ•˜๋˜ ์„œ๋ฒ„ ํƒœ์Šคํฌ๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ํด๋กœ์ฆˆ ๋˜์ง€ ์•Š์•„์„œ ์ฃผ๋กœ ๋ฐœ์ƒํ•˜๋Š”๋ฐ... ์ด๊ฑธ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด ํ”„๋กœ์„ธ์Šค๊ฐ€ ์ž๋™์œผ๋กœ ์ฃฝ์„ ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฌ๊ณค ํ–ˆ๋‹ค. ๋ฆฌ๋ˆ…์Šค์—์„œ๋Š” killall node ๋ช…๋ น์–ด๋กœ ํ•ด๊ฒฐ์ด ๋˜์ง€๋งŒ, ์œˆ๋„์šฐ์— ๋Œ€์‘ํ•˜๋Š” ๋ช…๋ น์–ด๋ฅผ ๋ชฐ๋ž๋‹ค. ๊ฒฐ๋ก ์„ ๋งํ•˜์ž๋ฉด ๋Œ€์‘ ๋ช…๋ น์–ด๋Š” taskkill ์ด๋‹ค. ์ด๋ฏธ ์ž˜ ์ฃฝ์ง€ ์•Š๋Š” ํ”„๋กœ์„ธ์Šค๊ฐ€ ์‚ด์•„์„œ ํฌํŠธ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ทธ๋ƒฅ taskkill๋งŒ ์จ์„  ์•ˆ๋˜๊ณ  /f ์˜ต์…˜์„ ๊ฐ™์ด ์จ์„œ ๊ฐ•์ œ ์ข…๋ฃŒํ•ด์•ผ ํ•œ๋‹ค. C:\Work\2nd-round>taskkill /im node.exe ์˜ค๋ฅ˜: ํ”„๋กœ์„ธ์Šค .. 2019. 2. 26.