{"id":26000,"date":"2024-10-27T06:48:58","date_gmt":"2024-10-27T06:48:58","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=26000"},"modified":"2024-11-26T07:46:45","modified_gmt":"2024-11-26T07:46:45","slug":"%eb%a6%ac%ec%95%a1%ed%8a%b8-%ea%b0%95%ec%a2%8c-%ec%bb%b4%ed%8f%ac%eb%84%8c%ed%8a%b8-%ed%8a%b8%eb%a6%ac%ec%97%90-%eb%8d%b0%ec%9d%b4%ed%84%b0-%ea%b3%b5%ea%b8%89%ed%95%98%ea%b8%b0-context","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/26000\/","title":{"rendered":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context"},"content":{"rendered":"<p><body><\/p>\n<article>\n<header>\n<p>\ub9ac\uc561\ud2b8\ub294 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4(UI)\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 React\uc758 Context API\ub97c \ud65c\uc6a9\ud558\uc5ec \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130\ub97c \uacf5\uae09\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \ub2e4\ub904\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Context\ub294 \ub9ac\uc561\ud2b8\uc758 \uac15\ub825\ud55c \uae30\ub2a5 \uc911 \ud558\ub098\ub85c, \ucef4\ud3ec\ub10c\ud2b8 \uac04\uc5d0 \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uc804\ub2ec\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4.<\/p>\n<\/header>\n<section>\n<h2>1. Context API\ub780?<\/h2>\n<p>Context API\ub294 \ub9ac\uc561\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\uac00 \ud544\uc694 \uc5c6\ub294 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uac8c\ub3c4 \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud560 \uc218 \uc788\uac8c \ud558\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c props drilling(\ud504\ub86d\uc2a4\ub97c \uc544\ub798\ub85c \uc804\ub2ec\ud558\ub294 \uacfc\uc815)\uc744 \ud53c\ud558\ub294 \ub370\uc5d0 \uc720\uc6a9\ud569\ub2c8\ub2e4. Context\ub97c \uc0ac\uc6a9\ud558\uba74 \uc0c1\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\ub85c \uc9c1\uc811\uc801\uc73c\ub85c props\ub97c \uc804\ub2ec\ud560 \ud544\uc694 \uc5c6\uc774 \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>Context\ub294 \uc8fc\ub85c \uc804\uc5ed \uc0c1\ud0dc\uad00\ub9ac\ub098 \ub2e4\uc218\uc758 \ud558\uc704 \uc694\uc18c\uc5d0 \ud544\uc694\ud55c \ub370\uc774\ud130\ub97c \uacf5\uc720\ud560 \ub54c \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790 \uc778\uc99d \uc815\ubcf4, UI \uc5b8\uc5b4 \uc124\uc815, \ud14c\ub9c8 \uc815\ubcf4 \ub4f1\uc744 Context\ub97c \uc0ac\uc6a9\ud558\uc5ec \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>2. Context API\uc758 \uad6c\uc131 \uc694\uc18c<\/h2>\n<p>Context API\ub294 \ub2e4\uc74c\uc758 \uc8fc\uc694 \uad6c\uc131 \uc694\uc18c\ub85c \uc774\ub8e8\uc5b4\uc838 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>Context \uc0dd\uc131\ud558\uae30<\/strong>: <code>React.createContext()<\/code> \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec Context\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>Provider \ucef4\ud3ec\ub10c\ud2b8<\/strong>: Context\uc758 Provider \ucef4\ud3ec\ub10c\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub370\uc774\ud130\ub97c \uacf5\uae09\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>Consumer \ucef4\ud3ec\ub10c\ud2b8<\/strong>: \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uad6c\ub3c5\ud558\uae30 \uc704\ud55c Consumer \ucef4\ud3ec\ub10c\ud2b8\uc785\ub2c8\ub2e4. \uc774 \uae30\uc220\uc740 render props \ud328\ud134\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>Hooks<\/strong>: <code>useContext<\/code> \ud6c5\uc744 \uc0ac\uc6a9\ud558\uc5ec \ud568\uc218\ud615 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c Context\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>3. Context\uc758 \uc0dd\uc131 \ubc0f \uae30\ubcf8 \uc0ac\uc6a9\ubc95<\/h2>\n<p>Context\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uccab \ubc88\uc9f8\ub85c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \uc608\uc81c\ub97c \ud1b5\ud574 \uac04\ub2e8\ud55c Context\ub97c \ub9cc\ub4e4\uc5b4 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\nimport React, { createContext, useContext, useState } from 'react';\n\n\/\/ 3.1. Context \uc0dd\uc131\nconst MyContext = createContext();\n\n\/\/ 3.2. Provider \ucef4\ud3ec\ub10c\ud2b8 \uc0dd\uc131\nconst MyProvider = ({ children }) =&gt; {\n    const [value, setValue] = useState('\uc548\ub155\ud558\uc138\uc694, \ub9ac\uc561\ud2b8!');\n\n    return (\n        <mycontext.provider setvalue=\"\" value=\"{{\" value,=\"\" }}=\"\">\n            {children}\n        <\/mycontext.provider>\n    );\n};\n\n\/\/ 3.3. Consumer \uc0ac\uc6a9 \uc608\uc2dc\nconst MyComponent = () =&gt; {\n    const { value } = useContext(MyContext);\n    return <h1>{value}<\/h1>;\n};\n\n\/\/ 3.4. App \ucef4\ud3ec\ub10c\ud2b8\nconst App = () =&gt; (\n    <myprovider>\n        <mycomponent><\/mycomponent>\n    <\/myprovider>\n);\n            <\/code><\/pre>\n<p>\uc774 \uc608\uc81c\uc5d0\uc11c <code>MyContext<\/code>\ub97c \uc0dd\uc131\ud558\uace0, <code>MyProvider<\/code>\ub97c \ud1b5\ud574 \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uac8c \ub370\uc774\ud130\ub97c \uacf5\uae09\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. <code>MyComponent<\/code>\uc5d0\uc11c\ub294 <code>useContext<\/code> \ud6c5\uc744 \uc0ac\uc6a9\ud558\uc5ec Context\uc758 \uac12\uc744 \uac00\uc838\uc635\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>4. \ub9ac\uc561\ud2b8 Context\uc758 \uace0\uae09 \uc0ac\uc6a9\ubc95<\/h2>\n<p>Context API\ub97c \uc0ac\uc6a9\ud560 \ub54c\ub294 \uae30\ubcf8\uc801\uc778 \uc0ac\uc6a9\ubc95 \uc678\uc5d0\ub3c4 \uc5ec\ub7ec \uac00\uc9c0 \uace0\ub824\ud574\uc57c \ub420 \uc0ac\ud56d\ub4e4\uc774 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uc139\uc158\uc5d0\uc11c\ub294 Context\ub97c \ub354 \ud6a8\uacfc\uc801\uc73c\ub85c \uc0ac\uc6a9\ud558\ub294 \uc5ec\ub7ec \uc804\ub7b5\ub4e4\uc5d0 \ub300\ud574 \uc124\uba85\ud569\ub2c8\ub2e4.<\/p>\n<h3>4.1. \ub2e4\uc911 Context \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\ud558\ub098\uc758 \uc5b4\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \uc5ec\ub7ec \uac1c\uc758 Context\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \uac00\ub2a5\ud569\ub2c8\ub2e4. \ub2e4\uc591\ud55c \ub370\uc774\ud130\ub97c \uac01\uac01\uc758 Context\ub85c \ubd84\ub9ac\ud558\uba74 \ucf54\ub4dc\uac00 \uac04\uacb0\ud574\uc9c0\uba70 \uc720\uc9c0\ubcf4\uc218\uc131\uc774 \ub192\uc544\uc9d1\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790 \uc124\uc815\uacfc \ud14c\ub9c8 \uc124\uc815, \uc5b8\uc5b4 \uc124\uc815\uc744 \uac01\uae30 \ub2e4\ub978 Context\ub85c \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>\nconst ThemeContext = createContext();\nconst LanguageContext = createContext();\n            <\/code><\/pre>\n<h3>4.2. Context\uc758 \uc131\ub2a5 \ucd5c\uc801\ud654<\/h3>\n<p>Context\ub97c \uc0ac\uc6a9\ud560 \ub54c\ub294 \uc131\ub2a5\uc774 \uc800\ud558\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. Context\uc5d0 \ubcc0\uacbd\uc774 \uc0dd\uae30\uba74 \ud558\uc704 \ucef4\ud3ec\ub10c\ud2b8\uac00 \ubaa8\ub450 \ub2e4\uc2dc \ub80c\ub354\ub9c1\ub429\ub2c8\ub2e4. \uc774\ub97c \ubc29\uc9c0\ud558\uae30 \uc704\ud574 \ub354 \uc138\ubd84\ud654\ub41c Context\ub85c \ub098\ub204\uac70\ub098, Memoization\uc744 \ud65c\uc6a9\ud558\ub294 \ubc29\ubc95\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>\nconst MyComponent = React.memo(() =&gt; {\n    const { value } = useContext(MyContext);\n    return <h1>{value}<\/h1>;\n});\n            <\/code><\/pre>\n<h3>4.3. Context\uc640 Redux \ube44\uad50<\/h3>\n<p>Context API\uc640 Redux\ub294 \ubaa8\ub450 \uc804\uc5ed \uc0c1\ud0dc \uad00\ub9ac\ub97c \uc704\ud55c \ubc29\ubc95\uc785\ub2c8\ub2e4. \ud558\uc9c0\ub9cc Redux\ub294 \ubcf5\uc7a1\ud55c \uc0c1\ud0dc \uad00\ub9ac\ub97c \uc704\ud55c \ud328\ud134\uc744 \uc81c\uc2dc\ud558\uace0, \ubbf8\ub4e4\uc6e8\uc5b4\uc640 \uac19\uc740 \ucd94\uac00\uc801\uc778 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uac04\ub2e8\ud55c \uc0c1\ud0dc \uad00\ub9ac\uc5d0\ub294 Context API\uac00 \uc801\ud569\ud558\uc9c0\ub9cc, \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ubcf5\uc7a1\ud574\uc9c8\uc218\ub85d Redux\ub97c \uace0\ub824\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>5. \ub9ac\uc561\ud2b8 \uc2e4\uc2b5 \uc608\uc81c<\/h2>\n<p>\uc774\uc81c \uc2e4\uc2b5\uc744 \ud1b5\ud574 Context API\ub97c \ud65c\uc6a9\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uc0ac\uc6a9\uc790 \uc778\uc99d \uc0c1\ud0dc\ub97c \uad00\ub9ac\ud558\ub294 \uac04\ub2e8\ud55c \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>\nconst AuthContext = createContext();\n\nconst AuthProvider = ({ children }) =&gt; {\n    const [isAuthenticated, setIsAuthenticated] = useState(false);\n\n    const login = () =&gt; setIsAuthenticated(true);\n    const logout = () =&gt; setIsAuthenticated(false);\n\n    return (\n        <authcontext.provider isauthenticated,=\"\" login,=\"\" logout=\"\" value=\"{{\" }}=\"\">\n            {children}\n        <\/authcontext.provider>\n    );\n};\n\nconst LoginButton = () =&gt; {\n    const { login } = useContext(AuthContext);\n    return <button onclick=\"{login}\">\ub85c\uadf8\uc778<\/button>;\n};\n\nconst LogoutButton = () =&gt; {\n    const { logout } = useContext(AuthContext);\n    return <button onclick=\"{logout}\">\ub85c\uadf8\uc544\uc6c3<\/button>;\n};\n\nconst AuthStatus = () =&gt; {\n    const { isAuthenticated } = useContext(AuthContext);\n    return <h2>{isAuthenticated ? '\ub85c\uadf8\uc778 \uc0c1\ud0dc\uc785\ub2c8\ub2e4' : '\ub85c\uadf8\uc778 \ud574\uc8fc\uc138\uc694'}<\/h2>;\n};\n\nconst App = () =&gt; (\n    <authprovider>\n        <authstatus><\/authstatus>\n        <loginbutton><\/loginbutton>\n        <logoutbutton><\/logoutbutton>\n    <\/authprovider>\n);\n            <\/code><\/pre>\n<p>\uc704\uc758 \uc608\uc81c\uc5d0\uc11c\ub294 <code>AuthContext<\/code>\ub97c \ub9cc\ub4e4\uc5b4 \uc0ac\uc6a9\uc790 \uc778\uc99d \uc0c1\ud0dc\ub97c \uad00\ub9ac\ud558\uace0, \uad00\ub828\ub41c \ucef4\ud3ec\ub10c\ud2b8\ub4e4\uc774 Context\ub97c \ud1b5\ud574 \ub85c\uadf8\uc778 \ubc0f \ub85c\uadf8\uc544\uc6c3 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>6. \uacb0\ub860<\/h2>\n<p>Context API\ub294 \ub9ac\uc561\ud2b8\uc5d0\uc11c \ucef4\ud3ec\ub10c\ud2b8 \uac04 \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uc804\ub2ec\ud560 \uc218 \uc788\uac8c \ud574\uc8fc\ub294 \uac15\ub825\ud55c \ub3c4\uad6c\uc785\ub2c8\ub2e4. \uac04\ub2e8\ud55c \ub370\uc774\ud130 \uc804\uc1a1\ubd80\ud130 \ubcf5\uc7a1\ud55c \uc0c1\ud0dc \uad00\ub9ac\uae4c\uc9c0 \ub2e4\uc591\ud55c \uc2dc\ub098\ub9ac\uc624\uc5d0\uc11c \ud65c\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc131\ub2a5 \ubb38\uc81c\ub97c \uace0\ub824\ud558\uc5ec \uc801\uc808\ud558\uac8c \uc0ac\uc6a9\ud55c\ub2e4\uba74 \uac1c\ubc1c \ud6a8\uc728\uc744 \ud06c\uac8c \uc99d\ub300\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ubc88 \uac15\uc88c\uac00 \ub9ac\uc561\ud2b8 \uac1c\ubc1c\uc5d0 \ub3c4\uc6c0\uc774 \ub418\uc5c8\uae30\ub97c \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<\/section>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ub9ac\uc561\ud2b8\ub294 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4(UI)\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 React\uc758 Context API\ub97c \ud65c\uc6a9\ud558\uc5ec \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130\ub97c \uacf5\uae09\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \ub2e4\ub904\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Context\ub294 \ub9ac\uc561\ud2b8\uc758 \uac15\ub825\ud55c \uae30\ub2a5 \uc911 \ud558\ub098\ub85c, \ucef4\ud3ec\ub10c\ud2b8 \uac04\uc5d0 \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uc804\ub2ec\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4. 1. Context API\ub780? Context API\ub294 \ub9ac\uc561\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\uac00 \ud544\uc694 \uc5c6\ub294 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uac8c\ub3c4 \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud560 \uc218 \uc788\uac8c \ud558\ub294 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/26000\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-26000","post","type-post","status-publish","format-standard","hentry","category-20"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/26000\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ub9ac\uc561\ud2b8\ub294 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4(UI)\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 React\uc758 Context API\ub97c \ud65c\uc6a9\ud558\uc5ec \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130\ub97c \uacf5\uae09\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \ub2e4\ub904\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Context\ub294 \ub9ac\uc561\ud2b8\uc758 \uac15\ub825\ud55c \uae30\ub2a5 \uc911 \ud558\ub098\ub85c, \ucef4\ud3ec\ub10c\ud2b8 \uac04\uc5d0 \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uc804\ub2ec\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4. 1. Context API\ub780? Context API\ub294 \ub9ac\uc561\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\uac00 \ud544\uc694 \uc5c6\ub294 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uac8c\ub3c4 \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud560 \uc218 \uc788\uac8c \ud558\ub294 &hellip; \ub354 \ubcf4\uae30 &quot;\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/26000\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-27T06:48:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T07:46:45+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context\",\"datePublished\":\"2024-10-27T06:48:58+00:00\",\"dateModified\":\"2024-11-26T07:46:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/\"},\"wordCount\":64,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"\ub9ac\uc561\ud2b8 \uae30\ucd08 \uac15\uc88c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/\",\"url\":\"https:\/\/atmokpo.com\/w\/26000\/\",\"name\":\"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-10-27T06:48:58+00:00\",\"dateModified\":\"2024-11-26T07:46:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/26000\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/26000\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/26000\/","og_locale":"ko_KR","og_type":"article","og_title":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ub9ac\uc561\ud2b8\ub294 \ucef4\ud3ec\ub10c\ud2b8\ub97c \uae30\ubc18\uc73c\ub85c \ud55c \uc0ac\uc6a9\uc790 \uc778\ud130\ud398\uc774\uc2a4(UI)\ub97c \uad6c\ucd95\ud558\ub294 \ub370 \uc0ac\uc6a9\ub418\ub294 JavaScript \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 React\uc758 Context API\ub97c \ud65c\uc6a9\ud558\uc5ec \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130\ub97c \uacf5\uae09\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \ub2e4\ub904\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Context\ub294 \ub9ac\uc561\ud2b8\uc758 \uac15\ub825\ud55c \uae30\ub2a5 \uc911 \ud558\ub098\ub85c, \ucef4\ud3ec\ub10c\ud2b8 \uac04\uc5d0 \ub370\uc774\ud130\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \uc804\ub2ec\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4. 1. Context API\ub780? Context API\ub294 \ub9ac\uc561\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\uac00 \ud544\uc694 \uc5c6\ub294 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uac8c\ub3c4 \ub370\uc774\ud130\ub97c \uc804\ub2ec\ud560 \uc218 \uc788\uac8c \ud558\ub294 &hellip; \ub354 \ubcf4\uae30 \"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context\"","og_url":"https:\/\/atmokpo.com\/w\/26000\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-10-27T06:48:58+00:00","article_modified_time":"2024-11-26T07:46:45+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/26000\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/26000\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context","datePublished":"2024-10-27T06:48:58+00:00","dateModified":"2024-11-26T07:46:45+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/26000\/"},"wordCount":64,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["\ub9ac\uc561\ud2b8 \uae30\ucd08 \uac15\uc88c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/26000\/","url":"https:\/\/atmokpo.com\/w\/26000\/","name":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-10-27T06:48:58+00:00","dateModified":"2024-11-26T07:46:45+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/26000\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/26000\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/26000\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"\ub9ac\uc561\ud2b8 \uac15\uc88c: \ucef4\ud3ec\ub10c\ud2b8 \ud2b8\ub9ac\uc5d0 \ub370\uc774\ud130 \uacf5\uae09\ud558\uae30, Context"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/26000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=26000"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/26000\/revisions"}],"predecessor-version":[{"id":26001,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/26000\/revisions\/26001"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=26000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=26000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=26000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}