{"id":210,"date":"2026-06-26T13:33:31","date_gmt":"2026-06-26T13:33:31","guid":{"rendered":"https:\/\/aabbee.cafe24.com\/?p=210"},"modified":"2026-06-26T14:02:46","modified_gmt":"2026-06-26T14:02:46","slug":"composition","status":"publish","type":"post","link":"https:\/\/coalacoding.com\/composition\/","title":{"rendered":"composition"},"content":{"rendered":"<h2><strong>1. \uae30\ucd08\uc601\uc0c1<\/strong><\/h2>\n<p><video controls width=\"100%\"><source src=\"https:\/\/youtu.be\/ORHmyu7sI3U\" type=\"video\/mp4\" \/><\/video><\/p>\n<h2><strong>2. \uc2ec\ud654\uc601\uc0c1<\/strong><\/h2>\n<p><video controls width=\"100%\"><source src=\"https:\/\/youtu.be\/Hw4UGYfz60c\" type=\"video\/mp4\" \/><\/video><\/p>\n<h2>3. Composition? (\ucef4\ud3ec\uc9c0\uc158?)<\/h2>\n<blockquote>\n<p>Nested Component \ucef4\ud3ec\ub10c\ud2b8 \ub77c\uace0\ub3c4 \ud558\uace0 \uc911\ucca9 \ucef4\ud3ec\ub10c\ud2b8\ub77c\uace0\ub3c4 \ud569\ub2c8\ub2e4.<\/p>\n<\/blockquote>\n<p>  \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc911\ucca9\ud558\ub294 \uac83\uc744 \ub9d0\ud569\ub2c8\ub2e4.<\/p>\n<p>  \ub9ac\uc561\ud2b8 \uc571\uc740 \uc218\ub9ce\uc740 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uac00\uc9c0\uac8c \ub429\ub2c8\ub2e4.<br \/>\n  \ucef4\ud3ec\ub10c\ud2b8\uac04\uc758 \uc8fc\uace0\ubc1b\ub294 \ub370\uc774\ud130 \ubfd0\ub9cc \uc544\ub2c8\ub77c \ubc15\uc2a4\ub098 \ucee8\ud14c\uc774\ub108\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \uc2a4\ud0c0\uc77c\ucf54\ub4dc\uc758 \uc911\ubcf5\uae4c\uc9c0\ub3c4 \ucd5c\uc18c\ud654 \ud558\ub824\uba74 props \ub9cc\uc73c\ub85c\ub294 \ud55c\uacc4\uac00 \uc788\ub294\ub370\uc694.<\/p>\n<p>  \uc774\ub54c \uc0ac\uc6a9\ud560\uc218 \uc788\ub294\uac83\uc774 composition(\ud569\uc131) \uc785\ub2c8\ub2e4.<br \/>\n  \uc571\uc5d0\uc11c \ubc18\ubcf5 \uc0ac\uc6a9\ub418\ub294 UI \ub514\uc790\uc778 \ucf54\ub4dc\ub97c \ubcc4\ub3c4\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc0dd\uc131\ud558\uc5ec \ud569\uc131\ud558\ub294 \ud559\uc2b5\uc744 \ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1.<strong>\ucef4\ud3ec\uc9c0\uc158 \uc900\ube44<\/strong><\/h3>\n<blockquote>\n<p>\uc544\ub798\uc758 \ub9c1\ud06c\ub294 index.js\uc5d0\uc11c App \ucef4\ud3ec\ub10c\ud2b8 \ub300\uc2e0 Comp \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc784\ud3ec\ud2b8 \ud55c \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<\/blockquote>\n<p>  \ub610\ud55c \ucef4\ud3ec\ub10c\ud2b8 \ub0b4\ubd80\uc5d0 style \uc744 \uac1d\uccb4\ub85c \uc791\uc131\ud558\uc5ec \uc801\uc6a9\ud558\uc600\uc2b5\ub2c8\ub2e4.<br \/>\n  \uc5d0\ub514\ud130 \uc6b0\uce21\ud558\ub2e8\uc758 Open Sandbox \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uba74 \uc608\uc81c \ucf54\ub4dc\ub97c \ub0b4\ub824 \ubc1b\uc73c\uc2dc\uac70\ub098 \ubc14\ub85c \uc628\ub77c\uc778\uc5d0\uc11c \ud3b8\uc9d1\ud558\uc2e4\uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<a href=\"https:\/\/codesandbox.io\/p\/sandbox\/composition-vmqn3k?file=%2Fsrc%2Findex.js&#038;from-embed=\">\ud83d\udd17\ucf54\ub4dc\uc0cc\ub4dc\ubc15\uc2a4\ub9c1\ud06c<\/a><\/p>\n<blockquote>\n<p><strong>Info<\/strong>: \ud83d\udca1 \ucef4\ud3ec\ub10c\ud2b8\ub294 \uc544\ub798\uc758 \uadf8\ub9bc\uacfc \uac19\uc740 \uad6c\uc870\ub85c \uc774\ub8e8\uc5b4\uc838 \uc788\uc73c\uba70 \ub3d9\uc77c\ud55c \uc2a4\ud0c0\uc77c\uc744 \uc911\ubcf5\ud558\uc5ec \uc0ac\uc6a9\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/blockquote>\n<p>  \uc911\ubcf5\ub418\ub294 \uc2a4\ud0c0\uc77c\uc744 \ucef4\ud3ec\uc9c0\uc158\uc73c\ub85c \uc218\uc815\ud574 \ubd05\uc2dc\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/01-13.png\" alt=\"\"><\/p>\n<p>\uc6b0\uc120 \uc911\ubcf5\ub418\ub294 \uc2a4\ud0c0\uc77c\uc744 \ub9c8\uad6c\ub9c8\uad6c \ub123\uc5b4\uc11c \ucef4\ud3ec\ub10c\ud2b8\ub97c \ub9cc\ub4e4\uc5b4 \ubd05\uc2dc\ub2e4.<\/p>\n<h4>3.1.1.<strong>srcindex.js<\/strong><\/h4>\n<pre><code class=\"language-javascript\">import { StrictMode } from &quot;react&quot;;\nimport { createRoot } from &quot;react-dom\/client&quot;;\n\n**import Comp from &quot;.\/Comp&quot;;**\n\nconst rootElement = document.getElementById(&quot;root&quot;);\nconst root = createRoot(rootElement);\n\nroot.render(\n  &lt;StrictMode&gt;\n**    &lt;Comp \/&gt;**\n  &lt;\/StrictMode&gt;,\n);\n<\/code><\/pre>\n<h4>3.1.1.<strong>srcComp.js<\/strong><\/h4>\n<pre><code class=\"language-javascript\">import CompA from &#39;.\/CompA&#39;;\nconst style = {\n\tcolor: &#39;white&#39;,\n\tbackground: &#39;#23b1c2&#39;,\n\twidth: &#39;50%&#39;,\n\ttextAlign: &#39;center&#39;,\n\tborderRadius: &#39;20px&#39;,\n\tmargin: &#39;20px auto&#39;,\n\tpadding: &#39;20px&#39;,\n};\nconst Comp = (props) =&gt; {\n\treturn (\n\t\t&lt;div style={style}&gt;\n\t\t\t&lt;CompA \/&gt;\n\t\t&lt;\/div&gt;\n\t);\n};\nexport default Comp;\n<\/code><\/pre>\n<h4>3.1.3.<strong>srcCompA.js<\/strong><\/h4>\n<pre><code class=\"language-javascript\">import CompAA from &quot;.\/CompAA&quot;;\nconst style = {\n  color: &quot;white&quot;,\n  width: &quot;80%&quot;,\n  padding: &quot;20px&quot;,\n  background: &quot;#d3b1b1&quot;,\n  textAlign: &quot;center&quot;,\n  borderRadius: &quot;20px&quot;,\n  marginRight: &quot;20px&quot;,\n  marginTop: &quot;20px&quot;,\n};\nconst CompA = (props) =&gt; {\n  return (\n    &lt;div style={style}&gt;\n      &lt;CompAA \/&gt;\n    &lt;\/div&gt;\n  );\n};\nexport default CompA;\n<\/code><\/pre>\n<h4>3.1.4.<strong>srcCompAA.js<\/strong><\/h4>\n<pre><code class=\"language-javascript\">const style = {\n  color: &quot;white&quot;,\n  background: &quot;#a5b1b1&quot;,\n  textAlign: &quot;center&quot;,\n  borderRadius: &quot;20px&quot;,\n  marginRight: &quot;20px&quot;,\n  marginTop: &quot;20px&quot;,\n  display: &quot;inline-block&quot;,\n  padding: &quot;20px&quot;,\n};\nconst CompAA = (props) =&gt; {\n  return (\n    &lt;&gt;\n      &lt;div style={style}&gt;CompAA&lt;\/div&gt;\n      &lt;div style={style}&gt;CompAA&lt;\/div&gt;\n      &lt;div style={style}&gt;CompAA&lt;\/div&gt;\n    &lt;\/&gt;\n  );\n};\nexport default CompAA;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/02-8.png\" alt=\"\"><\/p>\n<p>\uc774\ubbf8\uc9c0\uc640 \uac19\uc740 \ucef4\ud3ec\ub10c\ud2b8\uac00 \ub9cc\ub4e4\uc5b4\uc9c8 \uac83\uc785\ub2c8\ub2e4.<br \/>\n\ube68\uac04\ubc30\uacbd\uc758 \ucf54\ub4dc\ub294 \ucef4\ud3ec\ub10c\ud2b8\ub9c8\ub2e4 \uacf5\ud1b5\uc801\uc73c\ub85c \uc0ac\uc6a9\ud558\ub294 UI\uc2a4\ud0c0\uc77c \uc785\ub2c8\ub2e4.<\/p>\n<h3>3.2.<strong>\ucef4\ud3ec\uc9c0\uc158 \uc2dc\uc791<\/strong><\/h3>\n<h4><strong>3.2.1 srcindex.js<\/strong><\/h4>\n<p>index.js \uc5d0\uc11c \uc2dc\uc791\ucef4\ud3ec\ub10c\ud2b8\ub97c Comp \uc5d0\uc11c Box \ub85c \ubcc0\uacbd\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-javascript\">...\n\n**import Box from &quot;.\/Box&quot;;**\n\n...\n\nroot.render(\n  &lt;StrictMode&gt;\n**    &lt;Box \/&gt;**\n  &lt;\/StrictMode&gt;,\n);\n<\/code><\/pre>\n<h4><strong>3.2.1 srcBox.js<\/strong><\/h4>\n<p>src \ud3f4\ub354\ud558\uc704\uc5d0 Box \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc0dd\uc131\ud558\uace0 \uc544\ub798\uc758 \ucf54\ub4dc\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<br \/>\n\ubcc0\uc218 style \uc5d0 css \uc18d\uc131\uac12\uc744 \uac1d\uccb4\ud615\ud0dc\ub85c \ucd08\uae30\ud654 \ud588\uc2b5\ub2c8\ub2e4.<br \/>\nBox \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc120\uc5b8\ud558\uace0 div \uc694\uc18c\uc5d0 \ubbf8\ub9ac \uc815\uc758\ud55c style \uac1d\uccb4\ub97c style \uc18d\uc131\uc73c\ub85c \ud560\ub2f9\ud558\uc5ec \ubc18\ud658\ud558\ub294 \ub85c\uc9c1\uc744 \uad6c\ud604\ud569\ub2c8\ub2e4.<br \/>\n\ub9c8\uc9c0\ub9c9\uc73c\ub85c Box \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc678\ubd80\uc5d0\uc11c \uc0ac\uc6a9\ud560\uc218 \uc788\ub3c4\ub85d export \ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-javascript\">const style = {\n\tmarginTop: &#39;20px&#39;,\n\tborderRadius: &#39;20px&#39;,\n\ttextAlign: &#39;center&#39;,\n\tpadding: &#39;20px&#39;,\n\tcolor: &#39;white&#39;,\n};\nconst Box = (props) =&gt; {\n\treturn &lt;div style={style}&gt;&lt;\/div&gt;;\n};\nexport default Box;\n<\/code><\/pre>\n<h4><strong>3.2.2. srcCompAA.js<\/strong><\/h4>\n<p>\ubc15\uc2a4\ucef4\ud3ec\ub10c\ud2b8\ub97c \uc784\ud3ec\ud2b8 \ud569\ub2c8\ub2e4.<br \/>\nreturn \ud568\uc218\uc758 \uae30\uc874\uc758 \ucf54\ub4dc\ub97c \uc0ad\uc81c\ud55c \ud6c4 \uc784\ud3ec\ud2b8\ud55c Box \ucef4\ud3ec\ub10c\ud2b8\ub97c \ubc18\ud658\ud558\ub3c4\ub85d \uc218\uc815\ud569\ub2c8\ub2e4.<br \/>\n\uc774\ub54c Box \ucef4\ud3ec\ub10c\ud2b8\ub294 CompAA \uc758 style \uac1d\uccb4\ub97c style \uc18d\uc131\uc73c\ub85c \ud560\ub2f9\ubc1b\uc544 \uc0ac\uc6a9\ud558\ub3c4\ub85d \uad6c\ud604\ud569\ub2c8\ub2e4.<br \/>\n\uadf8\ub7fc \uc774\uc81c \ud654\uba74\uc744 \uc608\uc0c1\ud558\uba74\uc11c \uc2e4\ud589\ud574\ubd05\uc2dc\ub2e4<br \/>\nBox \ucef4\ud3ec\ub10c\ud2b8\uc5d0 style \uac1d\uccb4\uc758 \uac12\uc774 \uc801\uc6a9\ub3fc\uc11c \ub80c\ub354\ub9c1 \ub420\uac83 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-javascript\">import Box from &#39;.\/Box&#39;;\nconst style = {\n\tbackground: &#39;#a5b1b1&#39;,\n\tdisplay: &#39;inline-block&#39;,\n\tmarginRight: &#39;20px&#39;,\n};\nconst CompAA = (props) =&gt; {\n\treturn (\n\t\t&lt;&gt;\n\t\t\t&lt;Box style={style}&gt;CompAA&lt;\/Box&gt;\n\t\t\t&lt;Box style={style}&gt;CompAA&lt;\/Box&gt;\n\t\t\t&lt;Box style={style}&gt;CompAA&lt;\/Box&gt;\n\t\t&lt;\/&gt;\n\t);\n};\nexport default CompAA;\n<\/code><\/pre>\n<p>\uc608\uc0c1\uacfc \ub2e4\ub974\uac8c CompAA \uc758 \ub370\uc774\ud130\uac00 \uc804\ud600 \ub80c\ub354\ub9c1 \ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/03-2.jpg\" alt=\"Box \ucef4\ud3ec\ub10c\ud2b8\uc758 \uc2a4\ud0c0\uc77c \uc18d\uc131\uc740 \uc801\uc6a9\ub418\uc5c8\uc73c\ub098 CompAA \uc758 \uae30\uc874 \ub370\uc774\ud130\uc640 \uc2a4\ud0c0\uc77c \uc0ac\ub77c\uc9d0\"><\/p>\n<p><strong>\uac1c\ubc1c\uc790 \ubaa8\ub4dc\uc5d0\uc11c \uc18c\uc2a4\ucf54\ub4dc\ub97c \ud655\uc778\ud574\ubcf4\uba74 Box \ucef4\ud3ec\ub10c\ud2b8\uc758 \uc2a4\ud0c0\uc77c \uc18d\uc131\uc774 \uc801\uc6a9\ub41c\uac83\uc740 \ubcf4\uc774\ub098 \uae30\uc874 CompAA \uc758 \uc2a4\ud0c0\uc77c\uacfc \ub370\uc774\ud130\uac00 \ubcf4\uc774\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/strong><\/p>\n<div style=\"display:grid;grid-template-columns:repeat(2,1fr);gap:1rem\">\n<div>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/04-5.png\" alt=\"\"><\/p>\n<\/div>\n<div>\n<p>\uc65c\uadf8\ub7f4\uae4c\uc694?<br \/>\nCompAA \uc758 UI\ub294 Box \ucef4\ud3ec\ub10c\ud2b8\uac00 \uc784\ud3ec\ud2b8 \ub41c\uac83\uc774\uba70 Box \ucef4\ud3ec\ub10c\ud2b8\ub294 \ub2e4\ub978 \ud568\uc218\uc774\uae30 \ub54c\ubb38\uc5d0 CompAA \uc758 \uac12\uc744 \uc804\ub2ec\ud558\ub824\uba74 \uc778\uc790\uc640 \ub9e4\uac1c\ubcc0\uc218\ub97c \ud65c\uc6a9\ud574\uc57c \ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4.<\/p>\n<\/div>\n<\/div>\n<p><em><strong>\uc5b4\ub5bb\uac8c \ud574\uc57c \ud560\uae4c\uc694?<\/strong><\/em><\/p>\n<h3>3.3.<strong>props.children<\/strong><\/h3>\n<blockquote>\n<p><strong>\ucef4\ud3ec\ub10c\ud2b8\ub294 \ud568\uc218\uc785\ub2c8\ub2e4.<\/strong><\/p>\n<\/blockquote>\n<p>  <strong>\ud568\uc218\ub294 \uc778\uc218\uc640 \ub9e4\uac1c\ubcc0\uc218\uc758 \ud615\ud0dc\ub85c \uc11c\ub85c \uac12\uc744 \uc804\ub2ec\ud560\uc218 \uc788\uc8e0.<\/strong><\/p>\n<h4><strong>3.3.1. srcBox.js<\/strong><\/h4>\n<pre><code class=\"language-javascript\">const style = {\n\tmarginTop: &#39;20px&#39;,\n\tborderRadius: &#39;20px&#39;,\n\ttextAlign: &#39;center&#39;,\n\tpadding: &#39;20px&#39;,\n\tcolor: &#39;white&#39;,\n};\nconst Box = (props) =&gt; {\n**\tconsole.log(props);**\n\treturn &lt;div style={style}&gt;&lt;\/div&gt;;\n};\nexport default Box;\n<\/code><\/pre>\n<p>\ub9ac\uc561\ud2b8\uc5d0\uc11c\ub294 \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub9e4\uac1c\ubcc0\uc218 \ub97c \uc791\uc131\ud558\uba74 \uae30\ubcf8\uc801\uc73c\ub85c \uc0c1\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \uc804\ub2ec\ud558\ub294 \uac12 (\uc778\uc218) \uc744 \ubc1b\uc744\uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n\uc774\ub54c \ub9e4\uac1c\ubcc0\uc218\uc758 \uc774\ub984\uc740 abc, def \ub4f1 \uc5ec\ub7ec\ubd84\uc774 \ub9c8\uc74c\ub300\ub85c \uc9c0\uc815\ud558\uc154\ub3c4 \ub418\ub098 \uc77c\ubc18\uc801\uc73c\ub85c props \ub85c \uc791\uc131\ud569\ub2c8\ub2e4.<br \/>\n\ucf54\ub4dc\ub97c \uc791\uc131\ud6c4 \ucf58\uc194\ucc3d\uc744 \uc5f4\uc5b4\ubcf4\uba74 props \ub9e4\uac1c\ubcc0\uc218\uc5d0 \uc800\uc7a5\ub41c \uac12\uc774 \ud655\uc778\ub429\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/05-2.jpg\" alt=\"\"><\/p>\n<p>\uc774\uc81c Box \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \uc804\ub2ec\ubc1b\uc740 \uac12\uc744 \uc801\uc6a9\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h4><strong>3.3.2 \ucf58\ud150\uce20 \ud569\uc131<\/strong><\/h4>\n<p>props.children\uc740 React\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \ud2b9\ubcc4\ud55c \uc18d\uc131\uc785\ub2c8\ub2e4.<br \/>\n\uc774 \uc18d\uc131\uc740 \ubd80\ubaa8 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \uc790\uc2dd \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc804\ub2ec\ub41c \ubaa8\ub4e0 \ucee8\ud150\uce20\ub97c \ucc38\uc870\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-javascript\">\/\/src\/Box.js\nconst style = {\n\tmarginTop: &#39;20px&#39;,\n\tborderRadius: &#39;20px&#39;,\n\ttextAlign: &#39;center&#39;,\n\tpadding: &#39;20px&#39;,\n\tcolor: &#39;white&#39;,\n};\nconst Box = (props) =&gt; {\n\tconsole.log(props);\n\treturn &lt;div style={style}&gt;{props.children}&lt;\/div&gt;;\n};\nexport default Box;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/06-1.jpg\" alt=\"\uc774\uc81c CompAA \ucf58\ud150\uce20\uac00 \ub80c\ub354\ub9c1 \ub429\ub2c8\ub2e4.\"><\/p>\n<h4><strong>3.3.3 \uc2a4\ud0c0\uc77c \ud569\uc131<\/strong><\/h4>\n<p>\uc2a4\ud0c0\uc77c\uc740 \uac1d\uccb4\ud615\ud0dc\ub85c \uc804\ub2ec\ubc1b\uace0 \uc788\uc73c\ubbc0\ub85c \uc804\uac1c\uc5f0\uc0b0\uc790\ub97c \uc0ac\uc6a9\ud558\uaca0\uc2b5\ub2c8\ub2e4.<br \/>\n\uc0c8 \ubcc0\uc218\uc5d0 Box\ucef4\ud3ec\ub10c\ud2b8\uc758 \uc18d\uc131\uacfc \ubd80\ubaa8\ucef4\ud3ec\ub10c\ud2b8\uc758 \uc18d\uc131\uc744 \uc5f0\uacb0\ud569\ub2c8\ub2e4.<br \/>\n\uc694\uc18c\uc5d0\ub294 \uc0c8 \ubcc0\uc218\uc758 \uc774\ub984\uc744 \ub123\uc5b4\uc90d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-javascript\">\/\/src\/Box.js\n...\nconst newStyle = { ...style, ...props.style };\nreturn &lt;div style={newStyle}&gt;{props.children}&lt;\/div&gt;;\n...\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_555.jpg\" alt=\"\uc774\uc81c Box\ucef4\ud3ec\ub10c\ud2b8\ub97c \ud1b5\ud574 \uacf5\ud1b5 \uc2a4\ud0c0\uc77c \uc18d\uc131\uc744 \uc5ec\ub7ec \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ucc38\uc870 \ud560\uc218 \uc788\uc73c\uba70 \ub3d9\uc2dc\uc5d0 \uac01 \ucef4\ud3ec\ub10c\ud2b8\ubcc4 \ub3c5\ub9bd\uc801\uc778 \uc2a4\ud0c0\uc77c \uc18d\uc131\uc740 \uac1c\ubcc4 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \uc815\uc758\ud558\uc5ec \ud569\uc131\ud560\uc218 \uc788\uac8c \ub429\ub2c8\ub2e4.\"><\/p>\n<h3>3.4.\ubb38\uc81c<\/h3>\n<p>\ub098\uba38\uc9c0 \ucef4\ud3ec\ub10c\ud2b8\ub3c4 \ubaa8\ub450 Box\ucef4\ud3ec\ub10c\ud2b8\uc640 \ud569\uc131\ud574\ubcf4\uc138\uc694<\/p>\n<p><Accordion title=\"\ud574\ub2f5\"><br \/>\n<strong>src\/Comp.js<\/strong><\/p>\n<pre><code class=\"language-javascript\">\/\/src\/Comp.js\nimport Box from &#39;.\/Box&#39;;\nimport CompA from &#39;.\/CompA&#39;;\nconst style = {\n\tbackground: &#39;#23b1c2&#39;,\n\twidth: &#39;50%&#39;,\n\tmarginLeft: &#39;auto&#39;,\n\tmarginRight: &#39;auto&#39;,\n\tmarginBottom: &#39;20px&#39;,\n};\nconst Comp = (props) =&gt; {\n\treturn (\n\t\t&lt;Box style={style}&gt;\n\t\t\t&lt;CompA \/&gt;\n\t\t&lt;\/Box&gt;\n\t);\n};\nexport default Comp;\n<\/code><\/pre>\n<p><strong>src\/CompA.js<\/strong><\/p>\n<pre><code class=\"language-javascript\">\/\/src\/CompA.js\nimport Box from &#39;.\/Box&#39;;\nimport CompAA from &#39;.\/CompAA&#39;;\n\nconst style = {\n\twidth: &#39;80%&#39;,\n\tbackground: &#39;#d3b1b1&#39;,\n};\nconst CompA = (props) =&gt; {\n\treturn (\n\t\t&lt;&gt;\n\t\t\t&lt;h1&gt;CompA&lt;\/h1&gt;\n\t\t\t&lt;Box style={style}&gt;\n\t\t\t\t&lt;CompAA \/&gt;\n\t\t\t&lt;\/Box&gt;\n\t\t\t&lt;Box style={style}&gt;\n\t\t\t\t&lt;CompAA \/&gt;\n\t\t\t&lt;\/Box&gt;\n\t\t\t&lt;Box style={style}&gt;\n\t\t\t\t&lt;CompAA \/&gt;\n\t\t\t&lt;\/Box&gt;\n\t\t&lt;\/&gt;\n\t);\n};\nexport default CompA;\n<\/code><\/pre>\n<p><\/Accordion><\/p>\n<h2>4. <strong>Composition \uc2e4\uc804\uc608\uc81c<\/strong><\/h2>\n<blockquote>\n<p>\uc774\uc81c \uba64\ubc84\uc571\uc5d0 \uc801\uc6a9\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<\/blockquote>\n<p>  \uc601\uc0c1\uc744 \ubcf4\uace0 \ubc14\ub85c \ucf54\ub4dc\ub97c \ub530\ub77c \uce58\uc2dc\uae30 \ubcf4\ub2e4\ub294 \uc77c\uc2dc\uc815\uc9c0 \ud558\uc2dc\uace0\uc5ec\ub7ec\ubd84\uc774 \uc2a4\uc2a4\ub85c \ucef4\ud3ec\uc9c0\uc158\uc744 \ud574\ubcf4\uc2dc\uace0 \uc81c \ubc29\uc2dd\uc744 \ucc38\uace0\ud558\uc154\uc57c \uc2e4\ub825\uc774 \ud5a5\uc0c1\ub429\ub2c8\ub2e4.<br \/>\n  \uc544\ub798\uc758 \uadf8\ub9bc\uc5d0 \ud45c\uc2dc\ub41c \ubd80\ubd84\uc744 \ucef4\ud3ec\ub10c\ud2b8\ub85c \ubd84\ub9ac\ud558\uace0 \ud569\uc131\ud574\ubcf4\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/07-3.png\" alt=\"\uc911\ubcf5\ucf54\ub4dc\uac00 \ubc1c\uc0dd\ud558\ub294 \ubd80\ubd84\"><\/p>\n<h3><strong>4.2. src\/index.js \uc218\uc815<\/strong><\/h3>\n<ol>\n<li>index.js \ud30c\uc77c\uc744 \uc5f4\uace0 App \ucef4\ud3ec\ub10c\ud2b8\ub97c \ub2e4\uc2dc \uc784\ud3ec\ud2b8 \ud569\ub2c8\ub2e4<br \/>\n<strong>srcindex.js<\/strong><\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import React from &#39;react&#39;;\nimport ReactDOM from &#39;react-dom\/client&#39;;\nimport &#39;.\/index.css&#39;;\nimport Comp from &#39;.\/Comp&#39;;\nimport App from &#39;.\/App&#39;;\nimport reportWebVitals from &#39;.\/reportWebVitals&#39;;\n\nconst root = ReactDOM.createRoot(document.getElementById(&#39;root&#39;));\nroot.render(\n\t&lt;React.StrictMode&gt;\n\t\t&lt;App \/&gt;\n\t\t{\/* &lt;Comp \/&gt; *\/}\n\t&lt;\/React.StrictMode&gt;\n);\n\n\/\/ If you want to start measuring performance in your app, pass a function\n\/\/ to log results (for example: reportWebVitals(console.log))\n\/\/ or send to an analytics endpoint. Learn more: https:\/\/bit.ly\/CRA-vitals\nreportWebVitals();\n<\/code><\/pre>\n<h3><strong>4.3. \ucef4\ud3ec\ub10c\ud2b8 \uad6c\uc870 \uc900\ube44<\/strong><\/h3>\n<blockquote>\n<p>\ub9ac\uc561\ud2b8\uc758 \uc571\uc740 \uaddc\ubaa8\uac00 \ucee4\uc9c0\uac8c \ub418\uba74 \ucef4\ud3ec\ub10c\ud2b8 \ud30c\uc77c\ub3c4 \ub9ce\uc544\uc9d1\ub2c8\ub2e4.<\/p>\n<\/blockquote>\n<p>  \ub9ce\uc740 \ucef4\ud3ec\ub10c\ud2b8 \ud30c\uc77c\uc744 \uc5b4\ub5bb\uac8c \uad00\ub9ac \ud558\ub294\uc9c0\uc5d0 \ub300\ud55c \ubc29\ubc95\ub860\ub3c4 \uc81c\uc2dc\ub418\uace0 \uc788\uc73c\uba70 \uad00\ub9ac\ud558\ub294 \ud504\ub808\uc784\uc6cc\ud06c\uac00 \uc874\uc7ac\ud558\ub294 \uc815\ub3c4\uc785\ub2c8\ub2e4.<br \/>\n  \uac00\uc7a5 \uae30\ubcf8\uc801\uc778 \ubc29\ubc95\uc740 \ucef4\ud3ec\ub10c\ud2b8\uc758 \uc5ed\ud560\ubcc4\ub85c \ud3f4\ub354\ub97c \ub098\ub204\uc5b4 \ubcf4\ub294\uac83\uc778\ub370\uc694.<br \/>\n  \uc6b0\ub9ac\uc758 \uc571\uc740 \uc544\ub798\uc758 \uad6c\uc870\ub85c \ucef4\ud3ec\ub10c\ud2b8\ub97c \uad00\ub9ac\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/aabbee.cafe24.com\/wp-content\/uploads\/2026\/06\/08.jpg\" alt=\"\"><\/p>\n<ol>\n<li>src\/component \ud3f4\ub354\uc5d0 \uc544\ub798\uc758 \ud3f4\ub354\ub97c \uc0dd\uc131 \ud569\ub2c8\ub2e4<\/li>\n<\/ol>\n<ul>\n<li>components\/listViews\n<ul>\n<li>\ub9ac\uc2a4\ud2b8\ub97c \uad6c\uc131\ud558\ub294 \ucef4\ud3ec\ub10c\ud2b8 \ud3f4\ub354<\/li>\n<\/ul>\n<\/li>\n<li>components\/ui\n<ul>\n<li>UI \uc2a4\ud0c0\uc77c\uc744 \uad6c\uc131\ud558\ub294 \ucef4\ud3ec\ub10c\ud2b8 \ud3f4\ub354<\/li>\n<\/ul>\n<\/li>\n<li>components\/layout\n<ul>\n<li>\uc804\uccb4 \ub808\uc774\uc544\uc6c3\uc744 \uad6c\uc131\ud558\ub294 \ucef4\ud3ec\ub10c\ud2b8 \ud3f4\ub354<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol>\n<li>\uac01 \ud3f4\ub354\uc5d0 \ucef4\ud3ec\ub10c\ud2b8 \ud30c\uc77c\uacfc \uc2a4\ud0c0\uc77c \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li>App \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \uc784\ud3ec\ud2b8 \ud55c MemberItem \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc218\uc815\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<ul>\n<li>MemberItem \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucf54\ub4dc\ub294 listViews \ud3f4\ub354\uc758 Lists \ub85c \uc62e\uae41\ub2c8\ub2e4.<\/li>\n<li>\ub85c\uace0\ub3c4 \uc0ad\uc81c\ud569\ub2c8\ub2e4.<br \/>\n\uc644\ub8cc\ucf54\ub4dc<\/li>\n<li>\uc544\ub798\uc758 OpenSandbox \ub97c \ud074\ub9ad\ud558\uba74 \uc2dc\uc791\ucf54\ub4dc\ub97c \ubc1b\uc744\uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<a href=\"https:\/\/codesandbox.io\/p\/sandbox\/5-1-start-cmqz2q?from-embed=\"> <\/a>\ud83d\udd17<a href=\"https:\/\/codesandbox.io\/p\/sandbox\/5-1-start-cmqz2q?from-embed=\">OpenSandbox <\/a><\/li>\n<\/ul>\n<h3><strong>4.4. List \uc791\uc131<\/strong><\/h3>\n<ol>\n<li>MemberItem \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucf54\ub4dc\ub97c \uc798\ub77c\ub0b4\uc5b4 Lists \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ubd99\uc5ec\ub123\uc2b5\ub2c8\ub2e4.<\/li>\n<li>List \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucd5c\uc0c1\uc704 \uc694\uc18c\ub97c div \ub85c \ubcc0\uacbd\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_556.jpg\" alt=\"\"><\/p>\n<ol>\n<li>MemberItemList \ucef4\ud3ec\ub10c\ud2b8 \uc784\ud3ec\ud2b8\ub97c Items\ub85c \ubcc0\uacbd\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_558.jpg\" alt=\"\"><\/p>\n<h3><strong>4.5. Items \uc791\uc131<\/strong><\/h3>\n<ol>\n<li>MemberItemList \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucf54\ub4dc\ub97c \uc798\ub77c\ub0b4\uc5b4 Items \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ubd99\uc5ec\ub123\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_559.jpg\" alt=\"\"><\/p>\n<ol>\n<li>Item.js \uc5d0\uc11c MemberItemList \ub2e8\uc5b4\ub97c \ubaa8\ub450 Items \ub85c \uce58\ud658\ud569\ub2c8\ub2e4.<\/li>\n<li><code>import &#39;.\/Items.css&#39;;<\/code>\u00a0\ub97c \uc78a\uc9c0 \ub9d0\uace0 \uc791\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li><code>import ItemThumb from &#39;.\/ItemThumb&#39;; import ItemDesc from &#39;.\/ItemDesc&#39;;<\/code>\u00a0\ub77c\uc778\uc744 \uc0ad\uc81c\ud6c4\u00a0<code>import ItemEl from &#39;.\/ItemEl&#39;;<\/code>\u00a0\ub85c \uc218\uc815\ud569\ub2c8\ub2e4.<\/li>\n<li>Item.css \ub97c \uc218\uc815\ud569\ub2c8\ub2e4<\/li>\n<\/ol>\n<pre><code class=\"language-css\">.items {\n box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 18px 0px;\n padding: 3vw;\n margin: 5rem auto;\n border-radius: 2rem;\n}\n\nimg {\n width: 25rem;\n}\n<\/code><\/pre>\n<h3><strong>4.6. ItemEl \uc791\uc131<\/strong><\/h3>\n<ol>\n<li>\uc544\ub798\uc640 \uac19\uc774 \uc791\uc131\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import &#39;.\/ItemEl.css&#39;;\n\nconst ItemEl = (props) =&gt; {\n\treturn (\n\t\t&lt;div className=&#39;item_el&#39;&gt;\n\t\t\t&lt;span className=&#39;title&#39;&gt;&lt;\/span&gt;\n\t\t\t&lt;span className=&#39;content&#39;&gt;&lt;\/span&gt;\n\t\t&lt;\/div&gt;\n\t);\n};\nexport default ItemEl;\n<\/code><\/pre>\n<ol>\n<li>Items \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc774\ub3d9\ud558\uc5ec ItemEl \ucef4\ud3ec\ub10c\ud2b8\ub85c \ud45c\uc2dc\ud560 props \ub97c \uc804\ub2ec\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">return (\n\t&lt;li className=&#39;items&#39;&gt;\n\t\t&lt;img src={props.thumb} alt={props.name} \/&gt;\n\t\t&lt;ItemEl title=&#39;\uc774\ub984&#39; content={props.name} \/&gt;\n\t\t&lt;ItemEl title=&#39;\uc774\uba54\uc77c&#39; content={props.email} \/&gt;\n\t&lt;\/li&gt;\n);\n<\/code><\/pre>\n<ol>\n<li>ItemEl \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c props\ub97c \uc801\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\"> &lt;span className=&#39;title&#39;&gt;{props.title}&lt;\/span&gt;\n &lt;span className=&#39;content&#39;&gt;{props.content}&lt;\/span&gt;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_561.jpg\" alt=\"\"><\/p>\n<ol>\n<li>ItemEl.css \ub97c \uc791\uc131\ud569\ub2c8\ub2e4<\/li>\n<\/ol>\n<pre><code class=\"language-css\">.title {\n color: var(--tone-1);\n font-weight: 900;\n margin-right: 2rem;\n width: 6rem;\n text-align: justify;\n font-size: 1.4rem;\n letter-spacing: 0.5px;\n}\n.content {\n font-size: 1.8rem;\n letter-spacing: -0.8px;\n font-size: 1.4rem;\n color: var(--shade-2);\n border-radius: 25rem;\n padding: 0.4rem 1rem;\n box-shadow: 2px 2px 1px #3a54771a, 0px 0px 2px #3a547769;\n box-shadow: 0px 0px 3px var(--blue);\n margin-right: 0.6rem;\n background-color: #2ea2cc33;\n}\n<\/code><\/pre>\n<h3><strong>4.7. ui \uc791\uc131<\/strong><\/h3>\n<h4><strong>4.7.1. Row \ucef4\ud3ec\ub10c\ud2b8<\/strong><\/h4>\n<ol>\n<li>Row \ucef4\ud3ec\ub10c\ud2b8\ub294 \ubc15\uc2a4 \uc815\ub82c \uad00\ub828 \uc18d\uc131\uc744 \uac16\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ubd80\ubaa8 \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucf58\ud150\uce20\ub97c \ud45c\uc2dc\ud560\uc218 \uc788\ub3c4\ub85d props\ub97c \ub123\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import &#39;.\/Row.css&#39;;\n\nconst Row = (props) =&gt; {\n\treturn &lt;div className=&#39;row&#39;&gt;{props.children}&lt;\/div&gt;;\n};\nexport default Row;\n<\/code><\/pre>\n<ol>\n<li>Row.css \ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">.row {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n\tmargin-top: 0.5rem;\n}\n@media screen and (max-width: 900px) {\n\t.row {\n\t\tflex-direction: column;\n\t\tgap:2vw;\n\t}\n}\n<\/code><\/pre>\n<h4><strong>4.7.2. Heading \ucef4\ud3ec\ub10c\ud2b8<\/strong><\/h4>\n<ol>\n<li>Heading \ucef4\ud3ec\ub10c\ud2b8\ub294 \uc81c\ubaa9\uc758 \uc2a4\ud0c0\uc77c\uc744 \uac16\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ubd80\ubaa8 \ucef4\ud3ec\ub10c\ud2b8\uc758 \ucf58\ud150\uce20\ub97c \ud45c\uc2dc\ud560\uc218 \uc788\ub3c4\ub85d props\ub97c \ub123\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import &#39;.\/Heading.css&#39;;\n\nconst Heading = (props) =&gt; {\n\treturn (\n\t\t&lt;&gt;\n\t\t\t&lt;h2 className=&#39;heading&#39;&gt;{props.content}&lt;\/h2&gt;\n\t\t&lt;\/&gt;\n\t);\n};\nexport default Heading;\n<\/code><\/pre>\n<ol>\n<li>Heading.css \ub97c \uc791\uc131\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">.heading {\n\tpadding: 4rem 10% 2rem;\n\ttext-align: center;\n  font-size:4rem;\n  text-transform:uppercase;\n}\n<\/code><\/pre>\n<h3><strong>4.8. composition \uc791\uc131<\/strong><\/h3>\n<h4><strong>4.8.1.List.js<\/strong><\/h4>\n<ol>\n<li>Row,Heading \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc784\ud3ec\ud2b8 \ud569\ub2c8\ub2e4.<\/li>\n<li>\ucef4\ud3ec\ub10c\ud2b8\uc5d0 \uc801\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p>\u00a0<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_562.jpg\" alt=\"\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_563.jpg\" alt=\"\"><\/p>\n<h4><strong>4.8.2.Items.js<\/strong><\/h4>\n<ol>\n<li>Row,Heading \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc784\ud3ec\ud2b8 \ud569\ub2c8\ub2e4.<\/li>\n<li>\ucd5c\uc0c1\uc704 \uc694\uc18c\ub97c div\ub85c \uc218\uc815\ud569\ub2c8\ub2e4<\/li>\n<li>ItemEl \ucef4\ud3ec\ub10c\ud2b8\ub97c Row \ucef4\ud3ec\ub10c\ud2b8\ub85c \ub798\ud551\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">return (\n &lt;div className=&#39;items&#39;&gt;\n \t&lt;img src={props.thumb} alt={props.name} \/&gt;\n \t&lt;Row&gt;\n \t\t&lt;ItemEl title=&#39;\uc774\ub984&#39; content={props.name} \/&gt;\n \t\t&lt;ItemEl title=&#39;\uc774\uba54\uc77c&#39; content={props.email} \/&gt;\n \t&lt;\/Row&gt;\n &lt;\/div&gt;\n);\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_564.jpg\" alt=\"\uc644\uc131\ud654\uba74\"><\/p>\n<h4><strong>4.8.3. layout \uc791\uc131<\/strong><\/h4>\n<ol>\n<li>layout.css<\/li>\n<\/ol>\n<pre><code class=\"language-css\">.main {\n\tmargin: 3rem auto;\n\twidth: 90%;\n\tmax-width: calc(100vw - 10rem);\n\tpadding: 2vw 20vw;\n}\n@media screen and (max-width: 1300px) {\n\t.main {\n\t\tpadding: 2vw 10vw;\n\t}\n}\n@media screen and (max-width: 700px) {\n\t.main {\n\t\tpadding: 2vw 4vw;\n\t}\n}\n<\/code><\/pre>\n<ol>\n<li>Layout.js<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import &#39;.\/Layout.css&#39;;\n\nconst Layout = (props) =&gt; {\n\treturn &lt;div className=&#39;main&#39;&gt;{props.children}&lt;\/div&gt;;\n};\nexport default Layout;\n<\/code><\/pre>\n<ol>\n<li>App.js<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import Layout from &#39;.\/components\/layout\/Layout&#39;;\nreturn (\n\t&lt;div className=&#39;App&#39;&gt;\n\t\t&lt;Layout&gt;\n\t\t\t&lt;Lists db={MemberDB} \/&gt;\n\t\t&lt;\/Layout&gt;\n\t&lt;\/div&gt;\n);\n<\/code><\/pre>\n<h3><strong>5. composition \uc2ec\ud654<\/strong><\/h3>\n<blockquote>\n<p>\ub9cc\uc57d \ud2b9\uc815 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c Row \ucef4\ud3ec\ub10c\ud2b8\uc758 \uc18d\uc131\uc744 \ubcc0\ud615 \ud558\ub824\uba74 \uc5b4\ub5bb\uac8c \ud574\uc57c\ud560\uae4c\uc694?<\/p>\n<\/blockquote>\n<p>  \uc608\ub97c \ub4e4\uba74 Lists \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \uc801\uc6a9\ub41c Row \ub9cc\u00a0<code>flex-wrap:warp<\/code>\u00a0\ub85c \uc218\uc815\ud558\uc5ec \ub808\uc774\uc544\uc6c3\uc758 \ub108\ube44\ubcf4\ub2e4 \ub113\uc744 \uacbd\uc6b0 \ub808\uc774\uc544\uc6c3\uc744 \uac1c\ud589\ud558\uace0 \uc2f6\uc2b5\ub2c8\ub2e4.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_566.jpg\" alt=\"\"><\/p>\n<p>  \uc801\uc6a9\ub41c Row \ucef4\ud3ec\ub10c\ud2b8\uc5d0 class \uc640 \uc18d\uc131\uc744 \ucd94\uac00\ud5c8\uace0 \ubd80\ubaa8\ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ud074\ub798\uc2a4\ub97c \uc870\uc815\ud558\uc5ec \ubaa8\uc591\uc744 \ubc14\uafc0\uc218\ub294 \uc5c6\uc744\uae4c\uc694?<br \/>\n  List \ucef4\ud3ec\ub10c\ud2b8\uc5d0\ub294 Row \ucef4\ud3ec\ub10c\ud2b8\uc5d0 className \uc18d\uc131\uc744 \uc791\uc131\ud55c \ucf54\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4. css \ub85c \uc774\ub3d9\ud558\uc5ec list \ud074\ub798\uc2a4\uc758 \uc18d\uc131\uc744 \uc815\uc758 \ud569\ub2c8\ub2e4.<\/p>\n<h3>5.2. srccomponentslistViewsLists.css<\/h3>\n<pre><code class=\"language-css\">.list {\n\tflex-wrap: wrap;\n}\n<\/code><\/pre>\n<p>\uc2e4\ud589 \ud654\uba74\uc774 \ubcc0\uacbd\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.<br \/>\n\uc774\uac83\uc774 \uc2e4\uc81c \uc801\uc6a9\uc774 \ub418\uc5c8\ub294\uc9c0 \uac1c\ubc1c\uc790\ubaa8\ub4dc\uc5d0\uc11c \uc0b4\ud3b4\ubcf4\uba74 row \uc5d0\ub294 list \ud074\ub798\uc2a4\uac00 \uc801\uc6a9\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.<br \/>\nRow \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ud074\ub798\uc2a4\ub97c \ucd94\uac00\ud558\ub294 \ucf54\ub4dc\uac00 \uc5c6\uae30 \ub54c\ubb38\uc778\ub370\uc694 Row \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc774\ub3d9\ud558\uc5ec \uc218\uc815\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<ol>\n<li>Row \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ucf58\uc194\ub85c\uadf8\ub85c props \uc758 \uac12\uc744 \ud655\uc778\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_567.jpg\" alt=\"\"><\/p>\n<ol>\n<li>\ubcc0\uc218\ub97c \ub9cc\ub4e4\uace0 props.className \uc744 \ud560\ub2f9\ud569\ub2c8\ub2e4<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">import &#39;.\/Row.css&#39;;\n\nconst Row = (props) =&gt; {\n\tconsole.log(props);\n\tconst addCls = props.className;\n\treturn &lt;div className=&#39;row&#39;&gt;{props.children}&lt;\/div&gt;;\n};\nexport default Row;\n<\/code><\/pre>\n<ol>\n<li>div className \uc744 \uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8 \ud45c\ud604\uc2dd\uc73c\ub85c \ubcc0\uacbd\ud569\ub2c8\ub2e4.<\/li>\n<\/ol>\n<pre><code class=\"language-javascript\">return &lt;div className={`row ${addCls}`}&gt;{props.children}&lt;\/div&gt;;\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/qwerewqwerew.github.io\/retype-react\/%EB%A6%AC%EC%95%A1%ED%8A%B8%EC%A2%80%ED%95%B4%EB%9D%BC\/assets\/imgs\/11-23_568.jpg\" alt=\"\uc2e4\ud589\ud654\uba74\"><\/p>\n<p>\uc774\uc81c Row\ub97c \uc784\ud3ec\ud2b8 \ud558\ub294 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ud074\ub798\uc2a4\ub97c \ucd94\uac00\ud558\uba74 \uac1c\ubcc4\uc801\uc778 \uc2a4\ud0c0\uc77c\ub9c1\uc744 \ud560\uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>\n<a href=\"https:\/\/codesandbox.io\/p\/sandbox\/5-1-final-5nd9kw?file=%2Fsrc%2Findex.js&#038;from-embed=\">\u25b6\ufe0f<\/a><a href=\"https:\/\/codesandbox.io\/p\/sandbox\/5-1-final-5nd9kw?file=%2Fsrc%2Findex.js&#038;from-embed=\"><strong>\uc644\ub8cc\ucf54\ub4dc<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \uae30\ucd08\uc601\uc0c1 2. \uc2ec\ud654\uc601\uc0c1 3. Composition? (\ucef4\ud3ec\uc9c0\uc158?) Nested Component \ucef4\ud3ec\ub10c\ud2b8 \ub77c\uace0\ub3c4 \ud558\uace0 \uc911\ucca9 \ucef4\ud3ec\ub10c\ud2b8\ub77c\uace0\ub3c4 \ud569\ub2c8\ub2e4. \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc911\ucca9\ud558\ub294 \uac83\uc744 \ub9d0\ud569\ub2c8\ub2e4. \ub9ac\uc561\ud2b8 \uc571\uc740 \uc218\ub9ce\uc740 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uac00\uc9c0\uac8c \ub429\ub2c8\ub2e4. \ucef4\ud3ec\ub10c\ud2b8\uac04\uc758 \uc8fc\uace0\ubc1b\ub294 \ub370\uc774\ud130 \ubfd0\ub9cc \uc544\ub2c8\ub77c \ubc15\uc2a4\ub098 \ucee8\ud14c\uc774\ub108\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 \uc2a4\ud0c0\uc77c\ucf54\ub4dc\uc758 \uc911\ubcf5\uae4c\uc9c0\ub3c4 \ucd5c\uc18c\ud654 \ud558\ub824\uba74 props \ub9cc\uc73c\ub85c\ub294 \ud55c\uacc4\uac00 \uc788\ub294\ub370\uc694. \uc774\ub54c \uc0ac\uc6a9\ud560\uc218 \uc788\ub294\uac83\uc774 composition(\ud569\uc131) \uc785\ub2c8\ub2e4. \uc571\uc5d0\uc11c \ubc18\ubcf5 \uc0ac\uc6a9\ub418\ub294 UI \ub514\uc790\uc778 \ucf54\ub4dc\ub97c \ubcc4\ub3c4\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc0dd\uc131\ud558\uc5ec &#8230; <a title=\"composition\" class=\"read-more\" href=\"https:\/\/coalacoding.com\/composition\/\" aria-label=\"composition\uc5d0 \ub300\ud574 \ub354 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uc138\uc694\">\ub354 \uc77d\uae30<\/a><\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-react-basics"],"_links":{"self":[{"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":2,"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"predecessor-version":[{"id":2237,"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/posts\/210\/revisions\/2237"}],"wp:attachment":[{"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coalacoding.com\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}