{"id":1081,"date":"2022-07-06T07:11:05","date_gmt":"2022-07-06T07:11:05","guid":{"rendered":"https:\/\/lucyestela.com\/dev\/?p=1081"},"modified":"2022-07-06T07:24:47","modified_gmt":"2022-07-06T07:24:47","slug":"react-step-1-installation","status":"publish","type":"post","link":"https:\/\/lucyestela.com\/dev\/blog\/react-step-1-installation\/","title":{"rendered":"React &#8211; Step 1 &#8211; Installation"},"content":{"rendered":"<div class=\"boldgrid-section\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<p>&nbsp;<\/p>\n<p class=\"\">NOTE: I&#8217;m on a PC. If you&#8217;re on another operating system there might be slight differences so do a google search.<\/p>\n<p class=\"\">Right so you&#8217;ve decided you want to build a React app or perhaps you want to convert your html website to React. Great, but how do you do even get started?<\/p>\n<p class=\"\"><strong>PART A<\/strong><\/p>\n<p class=\"\">Well first things first, you need node.js installed. Before you go ahead and install anything, just do a quick check to see if it&#8217;s installed already.<\/p>\n<p class=\"\">Open Command prompt and type<\/p>\n<pre class=\"\">npm -v<\/pre>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1085 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react1-1.png\" alt=\"\" width=\"673\" height=\"178\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react1-1.png 673w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react1-1-300x79.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react1-1-250x66.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react1-1-550x145.png 550w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/p>\n<p>If you have it installed then it will give you your version number. Otherwise you&#8217;ll need to install it. To do that then, go <a href=\"https:\/\/nodejs.org\/en\/download\/\">here<\/a> to find the latest version for your OP.<\/p>\n<p class=\"\">I have&nbsp; PC so I downloaded the Windows Installer (.msi) file. Run it. You&#8217;ll be presented with a setup wizard, so just go through that.<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1082 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS.png\" alt=\"\" width=\"497\" height=\"387\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS.png 497w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS-300x234.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS-250x195.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS-231x180.png 231w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/nodeJS-385x300.png 385w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>\n<p class=\"\">PART B<\/p>\n<p class=\"\">Now you call install React. In Command Prompt type<\/p>\n<pre class=\"\"><code>npm install -g create-react-app<\/code><\/pre>\n<p class=\"\">Now navigate to where you want to install your React App, for example C:\\Users\\user\\Documents\\React and type this command<\/p>\n<pre class=\"\"><code>npx create-react-app new-app\r\n<\/code><\/pre>\n<p class=\"\">Now you need to go into that directory<\/p>\n<pre class=\"\"><code>cd new-app<\/code><\/pre>\n<p class=\"\">and fire it up<\/p>\n<pre class=\"\"><code>npm start<\/code><\/pre>\n<p>Your command prompt will do some funky stuff and present you with this<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1086 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2.png\" alt=\"\" width=\"671\" height=\"512\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2.png 671w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-300x229.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-250x191.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-550x420.png 550w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-236x180.png 236w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-393x300.png 393w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react2-655x500.png 655w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/p>\n<p class=\"\">And will open your browser with this<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1087 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3.png\" alt=\"\" width=\"500\" height=\"386\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3.png 500w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3-300x232.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3-250x193.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3-233x180.png 233w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react3-389x300.png 389w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>And what you&#8217;ll see in your new-app folder is this<\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1090 size-full\" src=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796.png\" alt=\"\" width=\"686\" height=\"254\" srcset=\"https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796.png 686w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796-300x111.png 300w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796-250x93.png 250w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796-550x204.png 550w, https:\/\/lucyestela.com\/dev\/wp-content\/uploads\/2022\/07\/react4-e1657092163796-486x180.png 486w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/p>\n<p>So now you have your React app set up, you can start playing around with code. What I needed to do though, was to translate my plain old html website into a React app. How did I do that then? Lots of trial and error. But I&#8217;ll give you an insight into that next.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; NOTE: I&#8217;m on a PC. If you&#8217;re on another operating system there might be slight differences so do a google search. Right so you&#8217;ve decided you want to build a React app or perhaps you want to convert your html website to React. Great, but how do you do even get started? PART A &#8230; <a title=\"React &#8211; Step 1 &#8211; Installation\" class=\"read-more\" href=\"https:\/\/lucyestela.com\/dev\/blog\/react-step-1-installation\/\" aria-label=\"More on React &#8211; Step 1 &#8211; Installation\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[3,128,127],"tags":[],"class_list":["post-1081","post","type-post","status-publish","format-standard","hentry","category-blog","category-react","category-web"],"_links":{"self":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/comments?post=1081"}],"version-history":[{"count":5,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1081\/revisions"}],"predecessor-version":[{"id":1092,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/posts\/1081\/revisions\/1092"}],"wp:attachment":[{"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/media?parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/categories?post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lucyestela.com\/dev\/wp-json\/wp\/v2\/tags?post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}