{"id":32869,"date":"2024-11-01T09:12:06","date_gmt":"2024-11-01T09:12:06","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=32869"},"modified":"2024-11-01T11:21:40","modified_gmt":"2024-11-01T11:21:40","slug":"react-course-how-react-apps-work","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/32869\/","title":{"rendered":"React Course: How React Apps Work"},"content":{"rendered":"<p><body><\/p>\n<p>React is a JavaScript library developed by Facebook, optimized for building user interfaces. It is primarily used for developing single-page applications (SPAs) and allows for efficient work with reusable UI components. In this course, I will explain in detail how React apps work.<\/p>\n<h2>1. What is React?<\/h2>\n<p>React is a component-based library designed to simplify the construction of complex applications. The core idea of React is to create &#8220;components,&#8221; small abstract entities that make up the UI.<\/p>\n<h2>2. Basic Concepts of React<\/h2>\n<h3>2.1. Components<\/h3>\n<p>Components are independent pieces that make up the UI as part of React. Each component can have its own state and properties, allowing them to perform various actions.<\/p>\n<h3>2.2. State and Props<\/h3>\n<p>React builds dynamic UIs through a component&#8217;s &#8220;state&#8221; and &#8220;props.&#8221; The state is managed within the component and changes according to user interactions. In contrast, props are the data passed from a parent component to a child component.<\/p>\n<h2>3. Structure of a React App<\/h2>\n<p>A React application consists of multiple components. Each component can contain other components, enabling the construction of complex UIs. Typically, a single root component encompasses all child components.<\/p>\n<h3>3.1. Example Structure<\/h3>\n<pre><code>\n\/App\n  \u251c\u2500 \/Header\n  \u251c\u2500 \/Main\n  \u2502   \u251c\u2500 \/Sidebar\n  \u2502   \u2514\u2500 \/Content\n  \u2514\u2500 \/Footer\n    <\/code><\/pre>\n<h2>4. How React Apps Work<\/h2>\n<h3>4.1. DOM and Virtual DOM<\/h3>\n<p>One of the most significant features of React is the concept of &#8220;Virtual DOM.&#8221; React uses Virtual DOM to optimize performance rather than directly accessing the real DOM. The Virtual DOM is a virtual representation of the DOM structure in memory, comparing differences with the actual DOM to minimize updates.<\/p>\n<h3>4.2. Process of Operation<\/h3>\n<ol>\n<li>When a React component is rendered, a Virtual DOM is created.<\/li>\n<li>When the state changes, a new Virtual DOM is generated.<\/li>\n<li>Previous and new Virtual DOMs are compared (diffing).<\/li>\n<li>Only the changed parts are updated in the real DOM.<\/li>\n<\/ol>\n<h3>4.3. Example Code<\/h3>\n<pre><code>\nimport React, { useState } from 'react';\n\nfunction Counter() {\n    const [count, setCount] = useState(0);\n\n    const increment = () => {\n        setCount(count + 1);\n    };\n\n    return (\n        <div>\n            <h1>Current Count: {count}<\/h1>\n            <button onclick=\"{increment}\">Increment<\/button>\n        <\/div>\n    );\n}\n    <\/code><\/pre>\n<h2>5. State Management<\/h2>\n<p>State management is an essential part of React applications. For complex state management, tools like Redux and MobX can be utilized.<\/p>\n<h3>5.1. State Management Using Redux<\/h3>\n<p>Redux is a pattern that centrally manages the entire state of the application. All states are stored in a store, and components are connected to this store to exchange data.<\/p>\n<h3>5.2. Example Code<\/h3>\n<pre><code>\nimport { createStore } from 'redux';\n\n\/\/ Initial state\nconst initialState = {\n    count: 0\n};\n\n\/\/ Define reducer\nconst reducer = (state = initialState, action) => {\n    switch (action.type) {\n        case 'INCREMENT':\n            return { ...state, count: state.count + 1 };\n        default:\n            return state;\n    }\n};\n\n\/\/ Create store\nconst store = createStore(reducer);\n    <\/code><\/pre>\n<h2>6. Deploying React Applications<\/h2>\n<p>React applications are transformed into static files through a build process and can be deployed on a web server. Generally, <code>create-react-app<\/code> can be used for easy setup for deployment.<\/p>\n<h3>6.1. Deployment Method<\/h3>\n<ol>\n<li>Build with the command <code>npm run build<\/code>.<\/li>\n<li>Upload the resulting <code>\/build<\/code> directory to the web server.<\/li>\n<\/ol>\n<h2>7. Conclusion<\/h2>\n<p>React is a powerful and flexible UI library that allows for easy management of complex applications through component-based programming. The use of Virtual DOM significantly enhances the performance of DOM updates, and state management libraries enable more systematic state management. Explore new possibilities in web application development with React.<\/p>\n<h2>8. References<\/h2>\n<ul>\n<li><a href=\"https:\/\/reactjs.org\/docs\/getting-started.html\">Official React Documentation<\/a><\/li>\n<li><a href=\"https:\/\/redux.js.org\/introduction\/getting-started\">Official Redux Documentation<\/a><\/li>\n<li><a href=\"https:\/\/create-react-app.dev\/docs\/getting-started\/\">Create React App Documentation<\/a><\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>React is a JavaScript library developed by Facebook, optimized for building user interfaces. It is primarily used for developing single-page applications (SPAs) and allows for efficient work with reusable UI components. In this course, I will explain in detail how React apps work. 1. What is React? React is a component-based library designed to simplify &hellip; <a href=\"https:\/\/atmokpo.com\/w\/32869\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;React Course: How React Apps Work&#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":[123],"tags":[],"class_list":["post-32869","post","type-post","status-publish","format-standard","hentry","category-react-basics-course"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>React Course: How React Apps Work - \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\/32869\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React Course: How React Apps Work - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"React is a JavaScript library developed by Facebook, optimized for building user interfaces. It is primarily used for developing single-page applications (SPAs) and allows for efficient work with reusable UI components. In this course, I will explain in detail how React apps work. 1. What is React? React is a component-based library designed to simplify &hellip; \ub354 \ubcf4\uae30 &quot;React Course: How React Apps Work&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/32869\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:12:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T11:21:40+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=\"3\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"React Course: How React Apps Work\",\"datePublished\":\"2024-11-01T09:12:06+00:00\",\"dateModified\":\"2024-11-01T11:21:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/\"},\"wordCount\":459,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"React basics course\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/\",\"url\":\"https:\/\/atmokpo.com\/w\/32869\/\",\"name\":\"React Course: How React Apps Work - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:12:06+00:00\",\"dateModified\":\"2024-11-01T11:21:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/32869\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/32869\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React Course: How React Apps Work\"}]},{\"@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":"React Course: How React Apps Work - \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\/32869\/","og_locale":"ko_KR","og_type":"article","og_title":"React Course: How React Apps Work - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"React is a JavaScript library developed by Facebook, optimized for building user interfaces. It is primarily used for developing single-page applications (SPAs) and allows for efficient work with reusable UI components. In this course, I will explain in detail how React apps work. 1. What is React? React is a component-based library designed to simplify &hellip; \ub354 \ubcf4\uae30 \"React Course: How React Apps Work\"","og_url":"https:\/\/atmokpo.com\/w\/32869\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:12:06+00:00","article_modified_time":"2024-11-01T11:21:40+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":"3\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/32869\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/32869\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"React Course: How React Apps Work","datePublished":"2024-11-01T09:12:06+00:00","dateModified":"2024-11-01T11:21:40+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/32869\/"},"wordCount":459,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["React basics course"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/32869\/","url":"https:\/\/atmokpo.com\/w\/32869\/","name":"React Course: How React Apps Work - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:12:06+00:00","dateModified":"2024-11-01T11:21:40+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/32869\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/32869\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/32869\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"React Course: How React Apps Work"}]},{"@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\/32869","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=32869"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32869\/revisions"}],"predecessor-version":[{"id":32870,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32869\/revisions\/32870"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=32869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=32869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=32869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}