React โš›๏ธ๐Ÿค”์™€ React์˜ ์ปดํฌ๋„ŒํŠธ ๊ฐœ๋…

1976 ๋‹จ์–ด reactwebdevbeginnersjavascript
์Œ, ์ด ๋ธ”๋กœ๊ทธ๋ฅผ ์—ด์—ˆ๋‹ค๋ฉด React ๊ฐœ๋ฐœ์ž์ด๊ฑฐ๋‚˜ ์ตœ์‹  ์œ ํ–‰์–ด์ธ Reactjs์— ๋Œ€ํ•ด ์•Œ๊ณ  ์‹ถ์œผ์‹ค ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๋ฆฌ์•กํŠธJS๋ž€?

React JS๋Š” ์ตœ์‹  ์›น ๊ฐœ๋ฐœ์—์„œ ๋Œ€ํ™”ํ˜• ์›น ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๊ตฌ์ถ•ํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋˜๋Š” JavaScript ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค. react.js์˜ ๊ธฐ๋ณธ ์•„์ด๋””์–ด๋Š” UI ์š”์†Œ๋ฅผ ์ž‘์€ ๊ตฌ์„ฑ ์š”์†Œ๋กœ ๋‚˜๋ˆ„๊ณ  ๋‚˜์ค‘์— ๊ฒฐํ•ฉํ•˜์—ฌ ์ „์ฒด ์•ฑ์„ ๋งŒ๋“œ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ๋จผ์ € ์•„๋ž˜ ์ด๋ฏธ์ง€ ์ฐธ์กฐ

์—ฌ๊ธฐ์—์„œ ํŠธ์œ„ํ„ฐ์˜ UI๋ฅผ ์„ธ ๊ฐ€์ง€ ์ฃผ์š” ๊ตฌ์„ฑ ์š”์†Œ๋กœ ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์„ธ ๊ฐ€์ง€ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ๋ชจ๋‘ ๋ณ„๋„๋กœ ์„ค๊ณ„ ๋ฐ ๊ฐœ๋ฐœํ•˜๊ณ  ๊ฒฐํ•ฉํ•˜์—ฌ ๊ธฐ๋ณธ UI๋ฅผ ๋งŒ๋“ค ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๊ตฌ์„ฑ ์š”์†Œ๋Š” ๋ณ„๋„์˜ ๊ตฌ์„ฑ ์š”์†Œ๋กœ ๋” ๋‚˜๋ˆŒ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜์—์„œ ํŠธ์œ„ํ„ฐ ์นด๋“œ๋ฅผ ์—ฌ๋Ÿฌ ๊ตฌ์„ฑ ์š”์†Œ๋กœ ๋‚˜๋ˆ„์—ˆ์Šต๋‹ˆ๋‹ค. React์˜ ํ•ต์‹ฌ์€ ์ปดํฌ๋„ŒํŠธ์ž…๋‹ˆ๋‹ค.
.

์ฃผ์–ด์ง„ ์˜ˆ์ œ์˜ Mockup์„ ์ปดํฌ๋„ŒํŠธ๋กœ ๋งŒ๋“ค์–ด ๋ด…์‹œ๋‹ค.
1) ์ขŒ์ธก ์ปดํฌ๋„ŒํŠธ
import React from "react"; 
class LeftComponent extends React.Component {
    render() {
       return(
        This is the left component
       )
    }
}

export default LeftComponent;

2) ์ค‘๊ฐ„ ๊ตฌ์„ฑ ์š”์†Œ
import React from "react"; 
class MidddleComponent extends React.Component {
    render() {
       return(
        This is the Middle component
       )
    }
}
export default MidddleComponent;

3) ์˜ค๋ฅธ์ชฝ ๊ตฌ์„ฑ ์š”์†Œ
import React from "react"; 
class RightComponent extends React.Component {
    render() {
       return(
        This is the Right component
       )
    }
}
export default RightComponent;

๊ทธ๋ž˜์„œ ์šฉ๋„์— ๋งž๊ฒŒ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋”ฐ๋กœ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ๊ทธ๋“ค ๋ชจ๋‘๋ฅผ ๊ฒฐํ•ฉํ•˜์ž



๊ทธ๋ž˜์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ๋ชจ๋“  ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ๊ธฐ๋ณธ ์•ฑ์œผ๋กœ ๊ฐ€์ ธ์˜ค๊ณ  ๋ชจ๋‘ ๊ฒฐํ•ฉํ•ฉ๋‹ˆ๋‹ค. ๊ตฌ์„ฑ ์š”์†Œ ๋ฐ ์‚ฌ์šฉ๋ฒ•์— ๊ด€ํ•œ ๋ชจ๋“  ๊ฒƒ.

์ด ๊ฒŒ์‹œ๋ฌผ์ด ๋งˆ์Œ์— ๋“œ์…จ์œผ๋ฉด ํ•ฉ๋‹ˆ๋‹ค. ์ด ๊ฒŒ์‹œ๋ฌผ์— ๋Œ€ํ•œ ๋ฐ˜์‘์˜ ๋…ผ๋ฆฌ์  ๊ตฌ๋ฌธ์— ๊นŠ์ด ๋“ค์–ด๊ฐ€๊ณ  ์‹ถ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ฐ€๋Šฅํ•œ ํ•œ ๋‹จ์ˆœํ•˜๊ฒŒ ์œ ์ง€ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค. ๊ตฌ๋ฌธ์ด ํฌํ•จ๋œ ์ „์ฒด ๋ฐ˜์‘ ์ž์Šต์„œ๋ฅผ ๋งŒ๋“ค๊ณ  ์‹ถ๋‹ค๋ฉด ์˜๊ฒฌ์— ์˜๊ฒฌ์„ ์ œ์‹œํ•˜์‹ญ์‹œ์˜ค.

๋‚ด๊ฐ€ ํ•˜๊ณ  ์žˆ๋Š” ๋ชจ๋“  ์ผ์„ ๋”ฐ๋ผํ•˜๋ ค๋ฉด Twitter์—์„œ ๋‚˜๋ฅผ ํŒ”๋กœ์šฐํ•˜์„ธ์š”. ==>

์ข‹์€ ์›นํŽ˜์ด์ง€ ์ฆ๊ฒจ์ฐพ๊ธฐ