Programming/React 34

[ React ] ์•„์ด์ฝ˜ ๋ˆ„๋ฅด๋ฉด ์Œ์•… ์žฌ์ƒ๋˜๋Š” ๊ธฐ๋Šฅ

์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ ์ค‘, ์•„์ด์ฝ˜์„ ๋ˆ„๋ฅด๋ฉด ์Œ์•…์ด ์žฌ์ƒ๋˜๋Š” ๊ธฐ๋Šฅ์ด ํ•„์š”ํ–ˆ๋‹ค. Off ์•„์ด์ฝ˜์œผ๋กœ ๋ณด์ด๋ฉด ์Œ์•…์ด ๊บผ์ ธ์žˆ๋‹ค๋Š” ๊ฒƒ์ด๊ณ , Up ์•„์ด์ฝ˜์œผ๋กœ ๋ณด์ด๋ฉด ์Œ์•…์ด ์‹คํ–‰์ค‘์ด๋ผ๋Š” ๋œป์ด๋‹ค. ์ด ๋‘˜ ์•„์ด์ฝ˜์€ mui์—์„œ ๊ฐ€์ ธ์™”๋‹ค. const [isPlay, setIsPlay] = useState(false); const audio = new Audio(music); const onClickVolume = () => { // ์žฌ์ƒ ์ค‘ if (isPlay) { audio.pause(); setIsPlay(false); } else { audio.play(); setIsPlay(true); } }; 1. ์ฒซ ๋ฒˆ์งธ ์˜ค๋ฅ˜ Cannot find module 'mp3 ๊ฒฝ๋กœ' or its corresponding type declara..

Programming/React 2024.01.09

[ React ] ๋ฆฌ๋””๋ฐ”ํƒ• ์›น ํฐํŠธ ์ ์šฉ

react ํ”„๋กœ์ ํŠธ์— ๋ฆฌ๋””๋ฐ”ํƒ•์„ ์ ์šฉํ•ด๋ณด์ž. https://ridicorp.com/ridibatang/ ๋ฆฌ๋””๋ฐ”ํƒ• - ๋ฆฌ๋””์ฃผ์‹ํšŒ์‚ฌ RIDI Corporation ๋ผ์ด์„ ์Šค ์•ˆ๋‚ด ๋ฆฌ๋””๋ฐ”ํƒ• ๊ธ€๊ผด์€ ๊ฐœ์ธ ๋ฐ ๊ธฐ์—… ์‚ฌ์šฉ์ž๋ฅผ ํฌํ•จํ•œ ๋ชจ๋“  ์‚ฌ์šฉ์ž์—๊ฒŒ ๋ฌด๋ฃŒ๋กœ ์ œ๊ณต๋˜๋ฉฐ ์ž์œ ๋กญ๊ฒŒ ์ˆ˜์ •ํ•˜๊ณ  ์žฌ๋ฐฐํฌํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹จ, ๊ธ€๊ผด ์ž์ฒด๋ฅผ ์œ ๋ฃŒ๋กœ ํŒ๋งคํ•˜๋Š” ๊ฒƒ์€ ๊ธˆ์ง€ํ•˜๋ฉฐ, ridicorp.com ์—ฌ๊ธฐ์„œ ํฐํŠธ๋ฅผ ๋‹ค์šดํ•œ๋‹ค. fonts ํด๋”๋ฅผ ๋งŒ๋“ค์–ด์„œ otf ํŒŒ์ผ์„ ๋„ฃ๋Š”๋‹ค. body { margin: 0; font-family: "RIDIBatang", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "D..

Programming/React 2023.12.20

[ React ] gsap ScrollTrigger ์‚ฌ์šฉ์‹œ execute 'removeChild' on 'Node': The node to be removed is not a child of this node ์˜ค๋ฅ˜

- ์ƒํ™ฉ https://webstoryboy.co.kr/1934 11. ํฌํŠธํด๋ฆฌ์˜ค ์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ : React-Site : ์…‹ํŒ…ํ•˜๊ธฐ Tutorial/portfolio ํฌํŠธํด๋ฆฌ์˜ค ์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ - React by @webs 2023. 08. 01. 01 ํฌํŠธํด๋ฆฌ์˜ค ์‚ฌ์ดํŠธ ๋งŒ๋“ค๊ธฐ : ์…‹ํŒ…ํ•˜๊ธฐ ๋‚œ์ด๋„ ์ค‘๊ฐ„ ์†Œ์Šค ๋‹ค์šด๋กœ๋“œ ์™„์„ฑ ํ™”๋ฉด ์™„์„ฑ ์ฝ”๋“œ ์˜์ƒ ๋ณด๊ธฐ ์†Œ๊ฐœ ์•ˆ๋…•ํ•˜์„ธ์š”! ์›น์Šคํ† ๋ฆฌ webstoryboy.co.kr ์ด ๋ธ”๋กœ๊ทธ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์‚ฌ์ดํŠธ๋ฅผ ๋งŒ๋“ค์—ˆ๋‹ค. ์ด ์‚ฌ์ดํŠธ์—์„œ๋Š” ํŽ˜์ด์ง€๊ฐ€ ํ•˜๋‚˜์˜€๋Š”๋ฐ, ๋‚˜๋Š” ๋ฉ”๋‰ด๋ณ„๋กœ ํŽ˜์ด์ง€๋ฅผ ๋งŒ๋“ค๊ณ  ์‹ถ์–ด์„œ ๋ผ์šฐํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‚˜๋ˆ„์—ˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ, ๊ณ„์† ๋ฉ”๋‰ด๋ฅผ ์˜ฎ๊ฒจ๊ฐˆ ๋•Œ execute 'removeChild' on 'Node': The node to be removed is not a child ..

Programming/React 2023.11.09

[ React ] function(์„ ์–ธ๋ฌธ) vs const (ํ‘œํ˜„์‹)

// ์„ ์–ธ๋ฌธ function main(){} // ํ‘œํ˜„์‹ const main = () =>{} ์ด ๋‘˜์˜ ์ฐจ์ด๋Š” ๋ฌด์—‡์ผ๊นŒ? 1. export default๋ฅผ ์„ ์–ธ๊ณผ ๋™์‹œ์— ํ•  ์ˆ˜ ์žˆ๋Š”๊ฐ€ export default function main(){} ์„ ์–ธ๋ฌธ์€ ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, ํ‘œํ˜„์‹์€ ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. 2. ํ˜ธ์ด์ŠคํŒ… ํ˜ธ์ด์ŠคํŒ…(Hoisting)์€ JavaScript์—์„œ ๋ณ€์ˆ˜ ์„ ์–ธ๊ณผ ํ•จ์ˆ˜ ์„ ์–ธ์„ ํ•ด๋‹น ์Šค์ฝ”ํ”„์˜ ์ตœ์ƒ๋‹จ์œผ๋กœ ๋Œ์–ด์˜ฌ๋ฆฌ๋Š” ๋™์ž‘์„ ๋งํ•ฉ๋‹ˆ๋‹ค. ๋ณ€์ˆ˜ ์„ ์–ธ์€ ํ˜ธ์ด์ŠคํŒ…๋˜์ง€๋งŒ ๋ณ€์ˆ˜์˜ ํ• ๋‹น์€ ํ˜ธ์ด์ŠคํŒ…๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ณ€์ˆ˜ ์„ ์–ธ์€ ์ตœ์ƒ๋‹จ์œผ๋กœ ๋Œ์–ด์˜ฌ๋ ค์ง€์ง€๋งŒ, ์‹ค์ œ๋กœ ๋ณ€์ˆ˜์— ๊ฐ’์„ ํ• ๋‹นํ•˜๋Š” ๋ถ€๋ถ„์€ ์›๋ž˜ ์ฝ”๋“œ์˜ ์œ„์น˜ ๊ทธ๋Œ€๋กœ ๋‚จ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ํ•จ์ˆ˜ ์„ ์–ธ๋ฌธ์€ ์ฝ”๋“œ๋ฅผ ๊ตฌํ˜„ํ•œ ์œ„์น˜์™€ ๊ด€๊ณ„์—†์ด ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์˜ ํŠน์ง•์ธ ํ˜ธ์ด์ŠคํŒ…์— ๋”ฐ๋ผ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์ž..

Programming/React 2023.07.27

[ React ] ๋ฐ˜์‘ํ˜•์›น์—์„œ ๊ณ„์† ๋ณ€ํ•˜๋Š” ๋ฒ„ํŠผ ์œ„์น˜ ์ฐพ์•„๋‚ด๊ธฐ, ๋ฒ„ํŠผ ๋ฐ‘์— edit ํ•  ์ˆ˜ ์žˆ๋Š” ๊ทธ๋ฆฌ๋“œ ๋ถ™์ด๊ธฐ

- ๋ชฉํ‘œ ๋ฐ˜์‘ํ˜•์›น์—์„œ ํŠน์ • ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐ”๋กœ ๋ฐ‘์— edit box๋ฅผ ๋„์›Œ์ง€๋Š” ๊ฒƒ ํšŒ์‚ฌ ํ”„๋กœ๊ทธ๋žจ ํ™”๋ฉด์„ ๋ณด์—ฌ์ค„ ์ˆ˜๋Š” ์—†์œผ๋‹ˆ ํ”ผ๊ทธ๋งˆ๋กœ ๋Œ€์ถฉ ๊ทธ๋ ค๋ณด์•˜๋‹ค. โ€ป Button๊ณผ Grid ๋ชจ๋‘ mui ์‚ฌ์šฉ 1. Button์— ref ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜๊ธฐ const buttonRef = useRef(null); const [showTextBox, setshowTextBox] = useState(false); // true์ผ๋•Œ edit box ๋ณด์—ฌ์ง Button {showTextBox ? ( ) : null} multipleButtonRef?.current?.getBoundingClientRect?.()?.bottom ์ด ๋ถ€๋ถ„์ด ํ•ต์‹ฌ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค. multipleButtonRef?.current?.getBounding..

Programming/React 2023.05.26

[ React ] ๊ฐ•์ œ ๋ Œ๋”๋ง

if (params.data.stgyField === 'attribute') { const temp = selectorDetailList2; for (let i = 0; i < temp.length; i += 1) { if (temp[i].stgyField === 'value' || temp[i].stgyField === 'minValue' || temp[i].stgyField === 'maxValue') { temp[i].stgyValue = ''; } } setSelectorDetailList2([]); setSelectorDetailList2(temp); } setSelectorDetailList2([]); ์ด ๋ถ€๋ถ„์„ ์ž…๋ ฅํ•˜์ง€ ์•Š์œผ๋ฉด ๊ทธ๋ฆฌ๋“œ๊ฐ€ ๋ฐ”๋กœ ๋ฐ”๋€Œ์ง€ ์•Š๋”๋ผ๊ณ . ์™œ ๊ทธ๋Ÿด๊นŒ? `setSelecto..

Programming/React 2023.05.11

[ React ] ๊ฐ์ฒด ๊ฐ’ ๋ณ€๊ฒฝ

https://developer-talk.tistory.com/246 [React]๊ฐ์ฒด ๋ฐฐ์—ด์—์„œ ๊ฐ’ ๋ณ€๊ฒฝ ์ด๋ฒˆ ํฌ์ŠคํŒ…์—์„œ๋Š” React์—์„œ ๊ฐ์ฒด์˜ ๋ฐฐ์—ด์„ ๊ฐ€์ง€๋Š” state ๊ฐ’์„ ๋ณ€๊ฒฝํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค. ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ฐ์ฒด์˜ ๋ฐฐ์—ด(objArray)์„ ๊ฐ€์ง€๋Š” state๊ฐ€ ์žˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค. state = { objArray: [ { code: "", name:.. developer-talk.tistory.com

Programming/React 2022.10.06

[ React ] ๊ทธ๋ฆฌ๋“œ ํŠน์ • ์…€ ๋“œ๋กญ๋ฐ•์Šค๋กœ ๋ณ€ํ™˜ + ๋ณด์—ฌ์ง€๋Š” ๊ฑด ๋‹ค๋ฅด๊ฒŒ ํ•˜๊ธฐ2 (ag-grid cellEditor, cellCellEditorParams)

์–ด์ œ https://yejinrla.tistory.com/90 [ React ] ๊ทธ๋ฆฌ๋“œ ํŠน์ • ์…€ ๋“œ๋กญ๋ฐ•์Šค๋กœ ๋ณ€ํ™˜ + ๋ณด์—ฌ์ง€๋Š” ๊ฑด ๋‹ค๋ฅด๊ฒŒ ํ•˜๊ธฐ (ag-grid cellEditorSelector, valueForm ๊ทธ๋ฆฌ๋“œ ํŠน์ • ์…€์„ ์ด๋ ‡๊ฒŒ ๋“œ๋กญ๋ฐ•์Šค๋กœ ๋ณ€ํ™˜์‹œ์ผœ ์„ ํƒํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•! https://www.ag-grid.com/react-data-grid/cell-editors/ React Data Grid: Cell Editors A Cell Editor Component is the UI that ap.. yejinrla.tistory.com ์ด ๊ธ€์„ ์ผ์—ˆ๋Š”๋ฐ ์ € ๊ธ€์— ๋‚จ๊ฒผ๋“ฏ์ด ๋ฌธ์ œ์ ์ด ์žˆ์—ˆ๋‹ค. ์–ด๋–ป๊ฒŒ๋“  ํ•ด๋‚ด๊ณ  ์‹ถ์–ด์„œ ๊ณ„์† ์ฐพ๋‹ค๊ฐ€ ๊ฒฐ๊ตญ ํ•ด๋ƒ„. https://www.ag-grid.com/javascri..

Programming/React 2022.10.05

[ React ] ๊ทธ๋ฆฌ๋“œ ํŠน์ • ์…€ ๋“œ๋กญ๋ฐ•์Šค๋กœ ๋ณ€ํ™˜ + ๋ณด์—ฌ์ง€๋Š” ๊ฑด ๋‹ค๋ฅด๊ฒŒ ํ•˜๊ธฐ (ag-grid cellEditorSelector, valueFormatter)

๊ทธ๋ฆฌ๋“œ ํŠน์ • ์…€์„ ์ด๋ ‡๊ฒŒ ๋“œ๋กญ๋ฐ•์Šค๋กœ ๋ณ€ํ™˜์‹œ์ผœ ์„ ํƒํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•! https://www.ag-grid.com/react-data-grid/cell-editors/ React Data Grid: Cell Editors A Cell Editor Component is the UI that appears, normally inside the Cell, that takes care of the Edit operation. Download v28 of the best React Data Grid in the world now. www.ag-grid.com ag grid์—์„œ ์„ค๋ช…ํ•ด์ฃผ๋Š” ๊ฑฐ ๋”ฐ๋ผํ•˜๋ฉด ์ž˜ ๋œ๋‹ค ์„ค์ • (setting) ๊ฐ’ (value) ์œ ํ˜• Finte const cellEditorSelector..

Programming/React 2022.10.04