{"id":32851,"date":"2024-11-01T09:11:59","date_gmt":"2024-11-01T09:11:59","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=32851"},"modified":"2024-11-01T11:21:44","modified_gmt":"2024-11-01T11:21:44","slug":"react-course-preparing-for-project-deployment-diary-app","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/32851\/","title":{"rendered":"React Course: Preparing for Project Deployment [Diary App]"},"content":{"rendered":"<p><body><\/p>\n<p>Hello, everyone! In this course, we will take a detailed look at the preparation process for deploying a diary app created with React. Deploying a web application developed with React requires several steps beyond simply uploading files to the server. In this article, we will cover pre-deployment checks and optimization, basic deployment methods, and post-deployment management and maintenance.<\/p>\n<h2>1. Project Optimization<\/h2>\n<p>Before deploying, it\u2019s important to optimize the application. Optimization helps improve user experience, reduce load times, and save server costs. Here are some points to consider during the optimization process.<\/p>\n<h3>1.1. Code Splitting<\/h3>\n<p>In React, you can reduce initial load times through code splitting. Code splitting allows you to divide different parts of the application into separate chunks and load them only when needed. This provides faster responsiveness when users are using the application. You can use <code>React.lazy<\/code> and <code>Suspense<\/code> for this.<\/p>\n<pre><code>\n    \/\/ Example code\n    const LazyComponent = React.lazy(() => import('.\/LazyComponent'));\n\n    function App() {\n        return (\n            <React.Suspense fallback={<div>Loading...<\/div>}>\n                <LazyComponent \/>\n            <\/React.Suspense>\n        );\n    }\n    <\/code><\/pre>\n<h3>1.2. Creating a Production Build<\/h3>\n<p>Running the application in development mode can degrade performance due to various development tools being activated. Therefore, you need to create a build in production mode. To generate a production build for a React app, use the following command.<\/p>\n<pre><code>npm run build<\/code><\/pre>\n<p>Executing this command will generate optimized files in the <code>build<\/code> folder.<\/p>\n<h2>2. Introduction to Deployment Methods<\/h2>\n<p>Now, let&#8217;s look at the deployment methods. There are various deployment platforms, but here we will introduce two representative methods: GitHub Pages and Netlify.<\/p>\n<h3>2.1. GitHub Pages<\/h3>\n<p>GitHub Pages is a free service for hosting static websites. The process for deploying a React application to GitHub Pages is as follows.<\/p>\n<ol>\n<li><strong>Create a GitHub Repository:<\/strong> Create a new repository on GitHub.<\/li>\n<li><strong>Install npm gh-pages:<\/strong> Install the <code>gh-pages<\/code> package for deployment to GitHub Pages.<\/li>\n<pre><code>npm install --save gh-pages<\/code><\/pre>\n<li><strong>Edit package.json:<\/strong> Add the <code>homepage<\/code> property to the <code>package.json<\/code> file.<\/li>\n<pre><code>\n        {\n            \"homepage\": \"https:\/\/username.github.io\/repository-name\"\n        }\n        <\/code><\/pre>\n<li><strong>Add Deployment Script:<\/strong> Add a deployment script to the <code>scripts<\/code> section of <code>package.json<\/code>.<\/li>\n<pre><code>\n        \"scripts\": {\n            \"predeploy\": \"npm run build\",\n            \"deploy\": \"gh-pages -d build\"\n        }\n        <\/code><\/pre>\n<li><strong>Execute Deployment:<\/strong> Run the following command to deploy the application.<\/li>\n<pre><code>npm run deploy<\/code><\/pre>\n<\/ol>\n<p>Now, you can access the deployed application via the <code>{homepage}<\/code> URL in your browser.<\/p>\n<h3>2.2. Netlify<\/h3>\n<p>Netlify is a very popular platform for hosting static websites. Here\u2019s how to deploy a React application to Netlify.<\/p>\n<ol>\n<li><strong>Create a Netlify Account:<\/strong> Visit the Netlify website to create a free account.<\/li>\n<li><strong>Create New Site:<\/strong> Click the <code>New site from Git<\/code> button to connect to your GitHub repository.<\/li>\n<li><strong>Build Settings:<\/strong> Set the build command to <code>npm run build<\/code> and specify the deployment directory as <code>build<\/code>.<\/li>\n<li><strong>Deploy Site:<\/strong> Click the <code>Deploy site<\/code> button to start the deployment.<\/li>\n<\/ol>\n<p>Once the deployment is complete, you can access the application using the URL provided by Netlify.<\/p>\n<h2>3. Post-Deployment Management and Maintenance<\/h2>\n<p>After deployment, it is important to check whether the application is functioning reliably. Here are some aspects to manage post-deployment.<\/p>\n<h3>3.1. Error Monitoring<\/h3>\n<p>It\u2019s a good idea to use error tracking tools to monitor potential errors in the deployed application. Tools like Sentry allow you to track errors in real-time and resolve issues.<\/p>\n<h3>3.2. Performance Monitoring<\/h3>\n<p>Use tools like Google Analytics to monitor the performance of your application. This helps you understand user traffic and behavior, and collect data needed for product improvement.<\/p>\n<h3>3.3. Collecting User Feedback<\/h3>\n<p>After deploying the application, it\u2019s important to collect feedback from users. Gather various insights from users about what they think of the application and use this information to improve the app.<\/p>\n<h2>4. Conclusion<\/h2>\n<p>Today, we examined the key steps in the preparation process for deploying a diary app made with React. We discussed code optimization, deployment methods, and post-deployment management and maintenance. I hope this article helps you with your React app deployment. Don\u2019t forget to continuously improve and manage the application after deployment!<\/p>\n<h2>5. Additional Resources<\/h2>\n<p>Here are some additional resources related to React and application deployment:<\/p>\n<ul>\n<li><a href=\"https:\/\/reactjs.org\/docs\/getting-started.html\" target=\"_blank\" rel=\"noopener\">React Official Documentation<\/a><\/li>\n<li><a href=\"https:\/\/create-react-app.dev\/docs\/adding-a-custom-domain\/\" target=\"_blank\" rel=\"noopener\">Create React App &#8211; Adding a Custom Domain<\/a><\/li>\n<li><a href=\"https:\/\/docs.netlify.com\/\" target=\"_blank\" rel=\"noopener\">Netlify Official Documentation<\/a><\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, everyone! In this course, we will take a detailed look at the preparation process for deploying a diary app created with React. Deploying a web application developed with React requires several steps beyond simply uploading files to the server. In this article, we will cover pre-deployment checks and optimization, basic deployment methods, and post-deployment &hellip; <a href=\"https:\/\/atmokpo.com\/w\/32851\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;React Course: Preparing for Project Deployment [Diary App]&#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-32851","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: Preparing for Project Deployment [Diary App] - \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\/32851\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"React Course: Preparing for Project Deployment [Diary App] - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"Hello, everyone! In this course, we will take a detailed look at the preparation process for deploying a diary app created with React. Deploying a web application developed with React requires several steps beyond simply uploading files to the server. In this article, we will cover pre-deployment checks and optimization, basic deployment methods, and post-deployment &hellip; \ub354 \ubcf4\uae30 &quot;React Course: Preparing for Project Deployment [Diary App]&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/32851\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T09:11:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-01T11:21:44+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\/32851\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32851\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"React Course: Preparing for Project Deployment [Diary App]\",\"datePublished\":\"2024-11-01T09:11:59+00:00\",\"dateModified\":\"2024-11-01T11:21:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32851\/\"},\"wordCount\":604,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"React basics course\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/32851\/\",\"url\":\"https:\/\/atmokpo.com\/w\/32851\/\",\"name\":\"React Course: Preparing for Project Deployment [Diary App] - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T09:11:59+00:00\",\"dateModified\":\"2024-11-01T11:21:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/32851\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/32851\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/32851\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"React Course: Preparing for Project Deployment [Diary App]\"}]},{\"@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: Preparing for Project Deployment [Diary App] - \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\/32851\/","og_locale":"ko_KR","og_type":"article","og_title":"React Course: Preparing for Project Deployment [Diary App] - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"Hello, everyone! In this course, we will take a detailed look at the preparation process for deploying a diary app created with React. Deploying a web application developed with React requires several steps beyond simply uploading files to the server. In this article, we will cover pre-deployment checks and optimization, basic deployment methods, and post-deployment &hellip; \ub354 \ubcf4\uae30 \"React Course: Preparing for Project Deployment [Diary App]\"","og_url":"https:\/\/atmokpo.com\/w\/32851\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T09:11:59+00:00","article_modified_time":"2024-11-01T11:21:44+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\/32851\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/32851\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"React Course: Preparing for Project Deployment [Diary App]","datePublished":"2024-11-01T09:11:59+00:00","dateModified":"2024-11-01T11:21:44+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/32851\/"},"wordCount":604,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["React basics course"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/32851\/","url":"https:\/\/atmokpo.com\/w\/32851\/","name":"React Course: Preparing for Project Deployment [Diary App] - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T09:11:59+00:00","dateModified":"2024-11-01T11:21:44+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/32851\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/32851\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/32851\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"React Course: Preparing for Project Deployment [Diary App]"}]},{"@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\/32851","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=32851"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32851\/revisions"}],"predecessor-version":[{"id":32852,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/32851\/revisions\/32852"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=32851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=32851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=32851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}