<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: rockiger</title>
    <description>The latest articles on DEV Community by rockiger (@rockiger).</description>
    <link>https://dev.to/rockiger</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F165096%2Fdf487502-bc23-453b-85b1-fd77074dca34.jpeg</url>
      <title>DEV Community: rockiger</title>
      <link>https://dev.to/rockiger</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rockiger"/>
    <language>en</language>
    <item>
      <title>Easily embed React apps into WordPress with ReactPress plugin</title>
      <dc:creator>rockiger</dc:creator>
      <pubDate>Mon, 22 Feb 2021 21:39:05 +0000</pubDate>
      <link>https://dev.to/rockiger/easily-embed-react-apps-into-wordpress-with-reactpress-plugin-7p8</link>
      <guid>https://dev.to/rockiger/easily-embed-react-apps-into-wordpress-with-reactpress-plugin-7p8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h7Y4wjG4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k596qhhhbbgroxr4r61a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h7Y4wjG4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k596qhhhbbgroxr4r61a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Why React and WordPress&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.wordpress.org" rel="noreferrer noopener" class="rank-math-link"&gt;WordPress&lt;/a&gt; and &lt;a href="https://reactjs.org" rel="noreferrer noopener" class="rank-math-link"&gt;React&lt;/a&gt; are a killer combination to develop web apps.&lt;/p&gt;

&lt;p&gt;With WordPress you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;easy content management for help pages, your landing page, your blog, and your other marketing activities&lt;/li&gt;
&lt;li&gt;secure and proven user management&lt;/li&gt;
&lt;li&gt;over 100.000 plugins&lt;/li&gt;
&lt;li&gt;a lot of flexibility over time to change the character of your site&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;React brings you the largest ecosystem to build great rich JavaScript apps that allow a simple data model, good performance and are easy to test.&lt;/p&gt;

&lt;p&gt;For example, if we want to write a new revolutionary email app, we can write the interface of the email client with React, but for everything else use WordPress. So while you're developing your app, you might want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;choose and install a theme&lt;/li&gt;
&lt;li&gt;create a landing page for your app&lt;/li&gt;
&lt;li&gt;add a form to collect email addresses&lt;/li&gt;
&lt;li&gt;create a blog and publish your posts on Twitter to promote your app&lt;/li&gt;
&lt;li&gt;optimize your site for search engines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later it might be useful to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;offer a paid membership&lt;/li&gt;
&lt;li&gt;create a forum or FAQ&lt;/li&gt;
&lt;li&gt;create separate landing pages&lt;/li&gt;
&lt;li&gt;all this can easily be done with WordPress, without writing a single line of code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Embedding a React app into WordPress with ReactPress&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3dOhVbBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://rockiger.com/wp-content/uploads/icon-256x256-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3dOhVbBJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://rockiger.com/wp-content/uploads/icon-256x256-1.png" alt="" class="wp-image-1359" width="256" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While there are other ways to integrate React with WordPress, the &lt;a href="https://wordpress.org/plugins/reactpress/" rel="noreferrer noopener" class="rank-math-link"&gt;ReactPress&lt;/a&gt; plugin is the easiest to embed a React app into a WordPress page and lets you use &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noreferrer noopener" class="rank-math-link"&gt;create-react-app&lt;/a&gt; without any custom build configurations.&lt;/p&gt;

&lt;p&gt;Not only does ReactPress automate the React integration for you, but it also ensures a seamless development experience, through running your local React dev server with the theme of your WordPress site.&lt;/p&gt;

&lt;h3&gt;Why not just using headless WordPress with SSR&lt;/h3&gt;

&lt;p&gt;I know that headless WordPress with &lt;a href="https://nextjs.org" rel="noreferrer noopener" class="rank-math-link"&gt;Next.js&lt;/a&gt;, &lt;a href="https://www.gatsbyjs.com" rel="noreferrer noopener" class="rank-math-link"&gt;Gatsby&lt;/a&gt;, or &lt;a href="https://frontity.org" rel="noreferrer noopener" class="rank-math-link"&gt;Frontity&lt;/a&gt; is all the rage right now, but with these solutions, you add a layer of complexity to your app, and more importantly, you lose a lot of the benefits of the WordPress ecosystem (themes and plugins).&lt;/p&gt;



&lt;p&gt;The steps from development to deployment are:&lt;/p&gt;

&lt;ol start="0"&gt;
&lt;li&gt;Setup your local dev environment.&lt;/li&gt;
&lt;li&gt;Install ReactPress on your local WordPress installation&lt;/li&gt;
&lt;li&gt;Create a new React app from your WP installation&lt;/li&gt;
&lt;li&gt;Develop your React app&lt;/li&gt;
&lt;li&gt;Build the app&lt;/li&gt;
&lt;li&gt;Install ReactPress on live WordPress site&lt;/li&gt;
&lt;li&gt;Create the same React app there&lt;/li&gt;
&lt;li&gt;Upload the build of your React app to your live site to deploy it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://youtu.be/pVi07A_OZYA"&gt;https://youtu.be/pVi07A_OZYA&lt;/a&gt;&lt;/p&gt;
The video shows the process with the TwentyTwenty-theme.



&lt;p&gt;Repeat steps 3, 4 and 7 until your app is finished.&lt;/p&gt;

&lt;h3&gt;Setup your local dev environment.&lt;/h3&gt;

&lt;p&gt;To develop React apps your WordPress installations needs access to: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the PHP function &lt;code&gt;shell_exec&lt;/code&gt; and &lt;code&gt;exec&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;nodejs&lt;/code&gt; package manager &lt;code&gt;npm&lt;/code&gt; version 6 or higher&lt;/li&gt;
&lt;li&gt;and a POSIX compatible system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means &lt;a href="https://localwp.com" rel="noreferrer noopener" class="rank-math-link"&gt;Local by Flywheel&lt;/a&gt; won't work, because you don't have control over the node environment there. The easiest way to create a local WordPress installation that fits the requirements is using the &lt;a href="https://bitnami.com/stack/wordpress/installer" rel="noreferrer noopener" class="rank-math-link"&gt;Bitnami-Installers&lt;/a&gt;. They provide a self-contained installation that doesn't pollute your system. &lt;/p&gt;

&lt;p&gt;However you install your WordPress dev system, if it meets the requirements you should be fine.&lt;/p&gt;

&lt;h3&gt;Install ReactPress on your local WordPress installation&lt;/h3&gt;

&lt;p&gt;In your local WordPress go to plugin installation, search for &lt;strong&gt;ReactPress&lt;/strong&gt;, install and activate the plugin.&lt;/p&gt;

&lt;h3&gt;Create a new React app from your local WP installation&lt;/h3&gt;

&lt;p&gt;In the admin of your WP installation, click on &lt;strong&gt;ReactPress&lt;/strong&gt; in the sidebar. There you should see a form to create a new React app.&lt;/p&gt;

&lt;p&gt;Enter a &lt;strong&gt;name&lt;/strong&gt; (later you need to use the same name in the live system), enter a &lt;strong&gt;pageslug&lt;/strong&gt;, choose the type "&lt;strong&gt;Develop a new app (Usually on a local machine).&lt;/strong&gt;" and choose the &lt;strong&gt;create-react-app-template&lt;/strong&gt; you would like to use and finally click the "&lt;strong&gt;Create React App&lt;/strong&gt;" button.&lt;/p&gt;

&lt;p&gt;After a short while your app should be created and running at port: &lt;strong&gt;3000&lt;/strong&gt;. If you click on the link you can see your local dev app running in the theme of your WP installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OfoaZQMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ps.w.org/reactpress/assets/screenshot-2.png%3Frev%3D2471443" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OfoaZQMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ps.w.org/reactpress/assets/screenshot-2.png%3Frev%3D2471443" alt=""&gt;&lt;/a&gt;ReactPress with running React app &lt;strong&gt;reactino&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;Develop your React app&lt;/h3&gt;

&lt;p&gt;Now you can develop your React app as you are used to. Use &lt;a href="https://developer.wordpress.org/rest-api/" rel="noreferrer noopener" class="rank-math-link"&gt;WordPress's built-in REST-API&lt;/a&gt; to get data or use the &lt;a href="https://www.wpgraphql.com" rel="noreferrer noopener" class="rank-math-link"&gt;WPGraphQL plugin&lt;/a&gt; if you prefer &lt;a href="https://graphql.org" rel="noreferrer noopener" class="rank-math-link"&gt;GraphQL&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Build the app&lt;/h3&gt;

&lt;p&gt;If you want to deploy to your live site, build your app through the WP admin. Don't use the CRA command line for this!&lt;/p&gt;

&lt;h3&gt;Install ReactPress on live WordPress site&lt;/h3&gt;

&lt;p&gt;Before you upload your React app, install ReactPress on your live site the same way you did on your local installation.&lt;/p&gt;

&lt;h3&gt;Create the same React app there&lt;/h3&gt;

&lt;p&gt;Create the same React app on your live system, that you created on your local system. &lt;em&gt;Important!&lt;/em&gt; Use the &lt;em&gt;exact same name&lt;/em&gt; and this time choose "&lt;strong&gt;Deploy an already build app (Usually on a server).&lt;/strong&gt;" as the type.&lt;/p&gt;

&lt;h3&gt;Upload the build of your React app to your live site to deploy it.&lt;/h3&gt;

&lt;p&gt;Finally, upload the build of your React app. Upload the build folder of your local React app to the app on your live system. &lt;/p&gt;

&lt;p&gt;The ReactPress admin shows where your apps are located. It will be something like this: &lt;code&gt;.../htdocs/wp-content/plugins/reactpress/apps/[your-appname]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you click on the URL slug of your React app in ReactPress you should see your React app on your live system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6n4N74dj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ps.w.org/reactpress/assets/screenshot-6.png%3Frev%3D2471443" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6n4N74dj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://ps.w.org/reactpress/assets/screenshot-6.png%3Frev%3D2471443" alt=""&gt;&lt;/a&gt;Deployed React app embedded into live WordPress site with TwentyTwenty-theme.&lt;/p&gt;

&lt;h2&gt;Where to go from here?&lt;/h2&gt;

&lt;p&gt;You should be able to create React app embedded in WordPress now. If you have the next big app idea you are ready to start. &lt;/p&gt;

&lt;p&gt;If you have any questions, let me know in the comments.&lt;/p&gt;

</description>
      <category>react</category>
      <category>wordpress</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Windows Survival Guide for React and Web Developers</title>
      <dc:creator>rockiger</dc:creator>
      <pubDate>Sun, 07 Jun 2020 20:13:38 +0000</pubDate>
      <link>https://dev.to/rockiger/windows-survival-guide-for-react-and-web-developers-4obi</link>
      <guid>https://dev.to/rockiger/windows-survival-guide-for-react-and-web-developers-4obi</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frockiger.com%2Fwp-content%2Fuploads%2FCapture-1024x576.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frockiger.com%2Fwp-content%2Fuploads%2FCapture-1024x576.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction or why I wrote a survival guide
&lt;/h2&gt;

&lt;p&gt;As a lifelong Linux user I started a job in a company where I had to use a Windows laptop. My job is to create a React frontend. Not knowing Windows I wondered about the best way to do my development work.&lt;/p&gt;

&lt;h2&gt;
  
  
  2 Routes
&lt;/h2&gt;

&lt;p&gt;During my research I discovered two ways for emulating a Linux/macOS like workflow in Windows. &lt;/p&gt;

&lt;p&gt;The first way creates a minimal bash environment to emulate a Linux command line. You will run Windows alternatives of your development tools.&lt;/p&gt;

&lt;p&gt;The second route uses the &lt;a href="https://docs.microsoft.com/de-de/windows/wsl/wsl2-index" rel="noopener noreferrer"&gt;Windows Subsystem for Linux 2&lt;/a&gt; (or short WSL 2) to create a Linux environment inside your Windows system. This way you can use all your Linux tools like in your Linux distro. On the downside it uses more system resources and needs more work to set up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which route to choose?
&lt;/h3&gt;

&lt;p&gt;If you have admin rights to your Windows machine and prefer Linux over Windows I would recommend going with WSL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fast Route
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  easy to setup&lt;/li&gt;
&lt;li&gt;  doesn't need admin right&lt;/li&gt;
&lt;li&gt;  uses fewer resources&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  it doesn't have to full power of a Linux distribution &lt;/li&gt;
&lt;li&gt;  your dev-environment will probably differ from your prod-environment&lt;/li&gt;
&lt;li&gt;  IO-operations with Yarn/NPM are slower&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fast route works fine for developers who want to get started quickly or don't have admin rights on their development machine. It will imitate a Linux or Mac dev-environment with a package manager for Windows called Scoop.&lt;/p&gt;

&lt;p&gt;The apps we install later are selected because they work without admin rights. For that reason I opted to install &lt;a href="https://nodejs.org/en/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; directly instead of using &lt;a href="https://github.com/coreybutler/nvm-windows" rel="noopener noreferrer"&gt;nvm-windows&lt;/a&gt; which needs admin rights to set the default node version.&lt;/p&gt;

&lt;p&gt;To start, open a &lt;strong&gt;PowerShell&lt;/strong&gt; and install &lt;a href="https://scoop.sh/" rel="noopener noreferrer"&gt;scoop&lt;/a&gt; first. Paste the following lines in your PowerShell:&lt;/p&gt;

&lt;pre&gt;set-ExecutionPolicy RemoteSigned -Scope currentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
 # If you get an error 'https is not supported try typing it by hand. Windows screws up URLs.
scoop help
 # for usage information
scoop search # this will show all available packages
scoop search git # this will show all available packages with git in their name&lt;/pre&gt;

&lt;p&gt;Now that we installed scoop, we can install our dev-environment:&lt;/p&gt;

&lt;pre&gt;scoop install git
scoop install nodejs-lts
scoop install yarn&lt;/pre&gt;

&lt;p&gt;Now it's time to test our dev-environment. Assuming you come from a &lt;strong&gt;Bash&lt;/strong&gt; background, it makes sense you are using &lt;a href="https://gitforwindows.org/#bash" rel="noopener noreferrer"&gt;Git Bash&lt;/a&gt; now, which was installed with git automatically. Open up Git Bash and create a React app:&lt;/p&gt;

&lt;pre&gt;git install https://github.com/GermaVinsmoke/bmi-calculator.git # If you get an error 'https is not supported try typing it by hand. Windows screws up URLs.
cd bmi-calculator.git
yarn # this will take some time
yarn start # this should start your default browser on http://localhost:3000&lt;/pre&gt;

&lt;h3&gt;
  
  
  Bonus: Installing an editor
&lt;/h3&gt;

&lt;p&gt;Assuming that you don't want to use notepad or vim for your development. It makes sense to install a different editor. Therefore we need to add another repository (called bucket) to scoop, then we can install most editors available (&lt;strong&gt;Atom&lt;/strong&gt;, &lt;strong&gt;VScode, Notepad++&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;For fans of &lt;a href="https://www.jetbrains.com/" rel="noopener noreferrer"&gt;Jetbrains&lt;/a&gt; products there is an additional bucket called &lt;strong&gt;jetbrains&lt;/strong&gt;.&lt;/p&gt;

&lt;pre&gt;scoop bucket add extra
scoop install vscode # or notepadplusplus or atom&lt;/pre&gt;

&lt;p&gt;If you are using &lt;strong&gt;Git Bash&lt;/strong&gt; it makes sense to restart it, because otherwise the editor will not available in your path. Other than that you are now good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rockstar Route
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Pros:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  dev-environment is the same as the prod-environment&lt;/li&gt;
&lt;li&gt;  has access to all Linux tools&lt;/li&gt;
&lt;li&gt;  very fast IO with NPM&lt;/li&gt;
&lt;li&gt;  can even run Linux GUI programs&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  uses more system resources&lt;/li&gt;
&lt;li&gt;  needs more work to set up&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Check if you have the right windows version
&lt;/h3&gt;

&lt;p&gt;If you want to install WSL 2 you need Windows build &lt;strong&gt;18917&lt;/strong&gt; or higher. You can check your Windows version with the shortcut &lt;code&gt;Win+R&lt;/code&gt; and enter &lt;code&gt;winver&lt;/code&gt; in the entry field. If you don't have a suitable build you need to join the &lt;a href="https://insider.windows.com" rel="noopener noreferrer"&gt;Windows Insider Programm&lt;/a&gt; in your Settings. I recommend the Slow track, where you get updates about once a week.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install WSL2
&lt;/h3&gt;

&lt;p&gt;First, we need to enable the Windows Subsystem for Linux and enable the &lt;strong&gt;Virtual Machine Platform&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Open a &lt;strong&gt;PowerShell&lt;/strong&gt; as administrator:&lt;/p&gt;

&lt;pre&gt;Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux # is this really needed
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart&lt;/pre&gt;

&lt;p&gt;Restart your system.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install a Linux Distribution (Assumes that you install Ubuntu)
&lt;/h3&gt;

&lt;p&gt;First set WSL 2 as default. In a PowerShell enter:&lt;/p&gt;

&lt;pre&gt;wsl --set-default-version 2&lt;/pre&gt;

&lt;p&gt;After that, go to the &lt;strong&gt;Microsoft Store&lt;/strong&gt; and search for the Linux distro you like. I will assume you chose &lt;a href="https://www.microsoft.com/de-de/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab" rel="noopener noreferrer"&gt;Ubuntu.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the Ubuntu from the Start menu and create a new user. The full installation of Ubuntu will need a view minutes.&lt;/p&gt;

&lt;p&gt;When the installation has finished, update the packages.&lt;/p&gt;

&lt;pre&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade&lt;/pre&gt;

&lt;p&gt;Now you have a fully functional Ubuntu at your fingertips. And can install your development tools analog to our solution above.&lt;/p&gt;

&lt;p&gt;By the way, if you want to open your current Ubuntu directory in Windows just type:&lt;/p&gt;

&lt;pre&gt;explorer.exe .&lt;/pre&gt;

&lt;p&gt;An Explorer window will open on your screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install VSCode on Windows
&lt;/h3&gt;

&lt;p&gt;To develop comfortably on Windows you should install VSCode on Windows. I personally had problems with the Scoop version. So install the &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;version from their website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Similar to the file explorer you can then open Ubuntu directories with&lt;/p&gt;

&lt;pre&gt;code .&lt;/pre&gt;

&lt;h3&gt;
  
  
  Install NodeJS and Yarn on Ubuntu
&lt;/h3&gt;

&lt;p&gt;Open up an Ubuntu window and enter the following code to install &lt;a href="https://classic.yarnpkg.com/en/" rel="noopener noreferrer"&gt;Yarn&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update &amp;amp;&amp;amp; sudo apt install yarn&lt;/pre&gt;

&lt;p&gt;Then install NodeJS with &lt;a href="////raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh%20|%20bash"&gt;Node Version Manager&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install --lts&lt;/pre&gt;

&lt;h3&gt;
  
  
  Use Linux tools to develop
&lt;/h3&gt;

&lt;p&gt;Now you should be able to use the development tools you need. To test your new environment try&lt;/p&gt;

&lt;pre&gt;npx create-react-app my-app
cd my-app
yarn start&lt;/pre&gt;

&lt;p&gt;A browser tab should open and you are able to start developing.&lt;/p&gt;

&lt;p&gt;Which way to develop do you prefer? Let me know if you are interested running Linux GUI programs with WSL 2.&lt;/p&gt;

&lt;p&gt;​​&lt;/p&gt;

</description>
      <category>wsl</category>
      <category>wsl2</category>
      <category>react</category>
    </item>
  </channel>
</rss>
