<?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: richi.codes</title>
    <description>The latest articles on DEV Community by richi.codes (@richicodes).</description>
    <link>https://dev.to/richicodes</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F10997%2Fdibuix_rixi.jpg</url>
      <title>DEV Community: richi.codes</title>
      <link>https://dev.to/richicodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/richicodes"/>
    <language>en</language>
    <item>
      <title>I Lost a Client in 12 Minutes — So I Built My Own Push Notifications</title>
      <dc:creator>richi.codes</dc:creator>
      <pubDate>Fri, 25 Sep 2026 11:25:41 +0000</pubDate>
      <link>https://dev.to/richicodes/i-lost-a-client-in-12-minutes-so-i-built-my-own-push-notifications-2cnj</link>
      <guid>https://dev.to/richicodes/i-lost-a-client-in-12-minutes-so-i-built-my-own-push-notifications-2cnj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnkbyxdp62pb3zgrpf5vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnkbyxdp62pb3zgrpf5vy.png" alt="Your site pings you the moment it matters: a push notification showing a new lead and a server-down alert" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's 11:03 AM. Someone fills out your contact form. They're asking about pricing, timelines — they want to start now.&lt;/p&gt;

&lt;p&gt;You see it at 4:40 PM, buried between 40 emails and two meetings. By then, that person has already messaged two other vendors. One replied in 12 minutes. They're already talking business.&lt;/p&gt;

&lt;p&gt;You didn't lose that client on price, or portfolio, or skill. You lost them to a &lt;strong&gt;5-hour-and-37-minute&lt;/strong&gt; gap. And it happens again next week, with the next lead, because email does the one thing it was built to do: feel non-urgent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; with the Web Push API (the browser's native push notification standard) and a webhook in your automation tool (n8n, Zapier, Make), any event on your site — a form, a sale, a server going down — can ping your phone in seconds. No app store, no third-party SaaS, no recurring cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  The channel you actually check, the second it buzzes
&lt;/h3&gt;

&lt;p&gt;No inbox wins in a world where whoever replies first wins the deal. You need something that actually interrupts you: the phone buzzing in your pocket, the notification sitting on your lock screen — the one you check without even thinking, no matter what you're doing.&lt;/p&gt;

&lt;p&gt;That already exists. It's called &lt;strong&gt;Web Push&lt;/strong&gt;, an open standard (the same one Gmail or Twitter use to notify you), and it doesn't require shipping anything to an app store or paying a monthly SaaS subscription. Your own website runs it, on your own server, under your own rules. One afternoon of work, zero recurring cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it actually works, no smoke and mirrors
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7r1vkbcoeo9lx3o1kp4e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7r1vkbcoeo9lx3o1kp4e.png" alt="Diagram: form submission, n8n webhook, Web Push API with VAPID, notification landing on a phone" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Someone takes an action&lt;/strong&gt; on your site: fills out a form, completes a purchase, signs up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A webhook picks it up&lt;/strong&gt;, in parallel with whatever you already have running (email, CRM). It doesn't replace anything — it just gets added on top.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your server signs the notification&lt;/strong&gt; using the Web Push standard (VAPID) and fires it off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your phone receives it&lt;/strong&gt;, browser closed, through a previously installed PWA (Progressive Web App — a website that installs to your home screen like a native app). No Apple Developer account, no Google Play, no one reviewing anything.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Four steps, the same technology already running inside apps you use daily, and you own the entire pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  It's not just a trick for leads. It's a channel for anything you decide matters
&lt;/h3&gt;

&lt;p&gt;Here's the part that's actually worth money: you choose what triggers the alert. Build the channel once, and from then on, anything that matters to your business can end up buzzing in your pocket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yk3s0621gpx6j5aemb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yk3s0621gpx6j5aemb9.png" alt="Six use cases: freelancing, e-commerce, monitoring, payments, support, and trading" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freelancer or agency:&lt;/strong&gt; you find out about the lead in minute one, not when you open your laptop in the evening.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;E-commerce:&lt;/strong&gt; "sale completed" the second the payment clears, instead of living inside the Shopify dashboard hitting refresh.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitoring:&lt;/strong&gt; your server goes down and you know before a customer emails asking why the site's not loading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payments &amp;amp; subscriptions:&lt;/strong&gt; a failed Stripe charge, a cancellation, a missed payment — you find out before it turns into an awkward phone call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Support:&lt;/strong&gt; an urgent ticket doesn't sit there waiting for you to open the dashboard in the morning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Any metric you're watching&lt;/strong&gt; (price, stock, a KPI): the moment it crosses a threshold, you know — not after the window to act on it has already closed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern is always the same: &lt;strong&gt;something happens → your server knows → your phone buzzes&lt;/strong&gt;. The only thing that changes is you deciding what "something" deserves to interrupt you.&lt;/p&gt;

&lt;h3&gt;
  
  
  "This sounds like a lot of work"
&lt;/h3&gt;

&lt;p&gt;It isn't, and that's the objection that stops most people from trying. You don't need a marketing budget, a dev team, or anyone's approval. You need one afternoon and the pieces you probably already have lying around, half-built: a website, a server to run it on, and some automation tool running in the background (n8n, Zapier, Make, whatever you use). The rest is just wiring four existing pieces together.&lt;/p&gt;

&lt;p&gt;The alternative is competing with a phone that only buzzes when your mom calls, while the lead you took five hours to notice already signed with someone else. That's the real comparison: one afternoon of setup, versus losing deals every week to minutes you don't control.&lt;/p&gt;

&lt;p&gt;Build it once. Use it for everything you actually need to know about in time.&lt;/p&gt;

&lt;p&gt;If you've got the website and the automation but not the time to sit down and wire it together, this is exactly the kind of project I fix in an afternoon: hooking it into your existing form, store, or n8n flow, without touching what already works.&lt;/p&gt;

&lt;h3&gt;
  
  
  FAQ
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What is the Web Push API?&lt;/strong&gt;&lt;br&gt;
It's the browser standard (supported by Chrome, Firefox, Edge, and Safari since iOS 16.4) that lets a website send push notifications to a device — even with the browser closed — as long as the user granted permission and installed the PWA.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to publish an app on the App Store or Google Play?&lt;/strong&gt;&lt;br&gt;
No. The notification arrives through a PWA (Progressive Web App) installed directly from the browser via "Add to Home Screen." It never goes through an app store or any review process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is VAPID, and what does it do?&lt;/strong&gt;&lt;br&gt;
VAPID (Voluntary Application Server Identification) is the mechanism your server uses to securely sign every push notification, proving it actually comes from your application and not from a third party.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it cost to run this?&lt;/strong&gt;&lt;br&gt;
Nothing recurring. There's no subscription to a notifications SaaS — sending happens on your own server, and the Web Push standard itself is free and open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is this only useful for form leads?&lt;/strong&gt;&lt;br&gt;
No. The mechanism is generic: any event a webhook can detect (a sale, a failed payment, a server outage, an urgent support ticket, a metric crossing a threshold) can trigger a push notification, with zero changes to the architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What do I need to set this up?&lt;/strong&gt;&lt;br&gt;
A website with its own backend (or serverless), an automation tool with webhooks (n8n, Zapier, Make, or similar), and a VAPID key pair — free to generate in one step. No extra infrastructure or paid licenses required.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Hello Vite + React!</title>
      <dc:creator>richi.codes</dc:creator>
      <pubDate>Wed, 17 Feb 2021 09:58:26 +0000</pubDate>
      <link>https://dev.to/richicodes/hello-vite-react-51no</link>
      <guid>https://dev.to/richicodes/hello-vite-react-51no</guid>
      <description>&lt;h2&gt;
  
  
  First of all introduce what is Vite ?
&lt;/h2&gt;

&lt;p&gt;Vite is a Next Generation Frontend Tooling created by Evan You, the creator of the open source JavaScript framework Vue.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why React?
&lt;/h2&gt;

&lt;p&gt;So if it's from Vue.js you might wonder... how come I use it to create a React project if it represents that it would be the direct competition? Well, because Vite is an authoring tool, totally agnostic and the tool itself guides us to create a React application as we will see below. &lt;/p&gt;

&lt;p&gt;And I can already tell you that the result is impressive, the speed with which it is created and the speed with which you can start working on your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get started?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;create&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;vitejs&lt;/span&gt;&lt;span class="sr"&gt;/ap&lt;/span&gt;&lt;span class="err"&gt;p
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76npl3r1vqffokftyzye.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F76npl3r1vqffokftyzye.png" alt="create vite"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Put the name of the project.
&lt;/h2&gt;

&lt;p&gt;In my case &lt;strong&gt;richi.codes&lt;/strong&gt;&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftghzpzin319qw0pjw2w3.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftghzpzin319qw0pjw2w3.png" alt="name project"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the template:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Scaffolding&lt;/span&gt; &lt;span class="nx"&gt;project&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="sr"&gt;/richi.codes...&lt;/span&gt;&lt;span class="err"&gt;.
&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;Select&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; 
  &lt;span class="nx"&gt;vanilla&lt;/span&gt;
  &lt;span class="nx"&gt;vue&lt;/span&gt;
  &lt;span class="nx"&gt;vue&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;
&lt;span class="err"&gt;❯&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt;
  &lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;
  &lt;span class="nx"&gt;preact&lt;/span&gt;
  &lt;span class="nx"&gt;preact&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;
  &lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;
  &lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;I choose React.&lt;/strong&gt;&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndzx34jzg66u467ir5ta.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndzx34jzg66u467ir5ta.png" alt="select template react"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  And that's it!
&lt;/h2&gt;

&lt;p&gt;We already have our project created now we just need to install and run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="nx"&gt;cd&lt;/span&gt; &lt;span class="nx"&gt;richi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;codes&lt;/span&gt;
  &lt;span class="nx"&gt;yarn&lt;/span&gt;
  &lt;span class="nx"&gt;yarn&lt;/span&gt; &lt;span class="nx"&gt;dev&lt;/span&gt;

&lt;span class="err"&gt;✨&lt;/span&gt; &lt;span class="nx"&gt;Done&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="mf"&gt;130.42&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Ready really fast
&lt;/h2&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnp1i1ef99i214nkv9xf.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnp1i1ef99i214nkv9xf.png" alt="ready in 725ms"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I have to say that compared to create-react-app, Vite is really faster and the result is amazing. It also seems that the project size is smaller than create-react-app, so if you are going to create a new project, Vite is really an option to consider.&lt;/p&gt;

&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8d882n3iuqk4cfusugza.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8d882n3iuqk4cfusugza.png" alt="running"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>vite</category>
    </item>
    <item>
      <title>Setting up and create your first React Native app with CLI ( not Expo ) with mac</title>
      <dc:creator>richi.codes</dc:creator>
      <pubDate>Mon, 23 Nov 2020 11:07:19 +0000</pubDate>
      <link>https://dev.to/richicodes/setting-up-and-create-your-first-react-native-with-cli-not-expo-with-mac-4c7l</link>
      <guid>https://dev.to/richicodes/setting-up-and-create-your-first-react-native-with-cli-not-expo-with-mac-4c7l</guid>
      <description>&lt;p&gt;This article will help you install and build your first React Native app with React Native CLI in your mac.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify Homebrew installation&lt;/strong&gt; using &lt;strong&gt;brew -v&lt;/strong&gt;, and if Homebrew is not installed then install &lt;a href="https://brew.sh/"&gt;Homebrew&lt;/a&gt; using&lt;/p&gt;

&lt;p&gt;/bin/bash -c "$(curl -fsSL &lt;a href="https://raw.githubusercontent.com/Homebrew/install/master/install.sh"&gt;https://raw.githubusercontent.com/Homebrew/install/master/install.sh&lt;/a&gt;)"&lt;/p&gt;

&lt;p&gt;Note: Homebrew installation requires the &lt;strong&gt;xcode-select&lt;/strong&gt; command-line tool to work so it's recommended to install Xcode as well or it will ask to confirm the installation of &lt;strong&gt;xcode-select&lt;/strong&gt; tool.&lt;/p&gt;

&lt;p&gt;Install &lt;strong&gt;node&lt;/strong&gt; and &lt;strong&gt;watchman&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install node watchman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install JDK using &lt;strong&gt;break cask&lt;/strong&gt; to install GUI software installation setups&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew cask install adoptopenjdk/openjdk/adoptopenjdk8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Install Android Studio
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developer.android.com/studio/index.html"&gt;Download and install Android Studio&lt;/a&gt;. While on Android Studio intallation wizard, make sure the boxes next to all of the following items are checked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Android SDK&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Android SDK Platform&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Android Virtual Device&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once setup has finalized and you’re presented with the Welcome screen, proceed to the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vCpOeKXA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3092/1%2AFMO_PFYrnVFM3ay4WOhbDw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vCpOeKXA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3092/1%2AFMO_PFYrnVFM3ay4WOhbDw.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the required android SDK dependencies’ paths in environment variables for React Native:&lt;/p&gt;
&lt;h1&gt;
  
  
  can use any editor instead of open open ~/.bash_profile
&lt;/h1&gt;

&lt;p&gt;Paste the following text at the end of the file**&lt;br&gt;
    # after other pre-configured environment variables export&lt;br&gt;
    ANDROID_HOME=$HOME/Library/Android/sdk export&lt;br&gt;&lt;br&gt;
    PATH=$PATH:$ANDROID_HOME/emulator export &lt;br&gt;
    PATH=$PATH:$ANDROID_HOME/tools export &lt;br&gt;
    PATH=$PATH:$ANDROID_HOME/tools/bin export &lt;br&gt;
    PATH=$PATH:$ANDROID_HOME/platform-tools&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MacOS Cataline has a default shell as zsh so to fix the warning below, edit/create ~/.zprofile (under /users/username/) file for Cataline and execute the commands below in your terminal.&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chsh -s /bin/zsh
source ~/.zprofile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can find Android SDK Location in Android SDK tab preferences in Android Studio to put in ANDROID_HOME&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8dk7YGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3992/1%2AVGYtsch-nULWwx7aUKBGaQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8dk7YGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3992/1%2AVGYtsch-nULWwx7aUKBGaQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Helpful Commands
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;printenv&lt;/strong&gt; prints all environment variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;xcode-select --version&lt;/strong&gt; allows you to view the version of xcode-select CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create and Run a React Native Project
&lt;/h2&gt;

&lt;p&gt;The steps to run the project is the same on all operating systems:&lt;/p&gt;

&lt;p&gt;Create a React Native project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx react-native init AwesomeApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Follow the &lt;a href="https://developer.android.com/studio/run/managing-avds"&gt;steps to create an android virtual device (AVD)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run the projects:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd AwesomeApp
npx react-native run-android --verbose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The above command process may ask to install &lt;strong&gt;CocoaPods&lt;/strong&gt;, which is a dependency manager for iOS projects and required to run iOS apps.&lt;/p&gt;

&lt;p&gt;In the above command, &lt;strong&gt;-verbose&lt;/strong&gt; is optional but useful to view any potential issues, like below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Known Gradle Issues
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;InvokerHelper Error&lt;/strong&gt;: Gradle version &lt;strong&gt;6.1.1&lt;/strong&gt; can cause this issue, so make sure to update &lt;strong&gt;distributionUrl&lt;/strong&gt; attribute in &lt;strong&gt;AwesomeApp\android\gradle\wrapper\gradle-wrapper.properties&lt;/strong&gt; file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# To fix the "Could not initialize class org.codehaus.groovy.runtime.InvokerHelper" error, use latest gradle
distributionUrl=https\\://services.gradle.org/distributions/gradle-6.5.1-all.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and update classpath in &lt;strong&gt;AwesomeApp\android\build.gradle&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;classpath("com.android.tools.build:gradle:4.0.0")&lt;/p&gt;

&lt;p&gt;Note: React Native may not use the exact&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;buildToolsVersion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;version declared in the&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AwesomeApp/android/build.gradle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;file, so in case of error the specific version needs to be installed from the Android SDK.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UGOwBcGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2808/1%2ADbJnuZUB964IuOpDuqLXGw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UGOwBcGu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2808/1%2ADbJnuZUB964IuOpDuqLXGw.png" alt="build.gradle file with version"&gt;&lt;/a&gt;&lt;em&gt;build.gradle file with version&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--reZcCjup--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3960/1%2A5I8Nn9cJivcFcstDFVKCUA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--reZcCjup--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3960/1%2A5I8Nn9cJivcFcstDFVKCUA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SI_9-svx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3988/1%2A_eXOkqDzNvHII9YQCqYt1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SI_9-svx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/3988/1%2A_eXOkqDzNvHII9YQCqYt1g.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  To fix Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Update gradle-wrapper.properties&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In my case distributionUrl distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip&lt;/p&gt;

&lt;p&gt;And I changed it to&lt;/p&gt;

&lt;p&gt;distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1fL2TZJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aag0BnvqYv-NMinpZeB-oVg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1fL2TZJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aag0BnvqYv-NMinpZeB-oVg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZHQ50f6X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2504/1%2AAOjq_3H3lO3YAyHcdtmMrQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZHQ50f6X--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2504/1%2AAOjq_3H3lO3YAyHcdtmMrQ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have updated all the files and followed the commented steps, you can start your application.&lt;/p&gt;

&lt;p&gt;npx react-native run-android --verbose&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q26BqyP8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2352/1%2A08qEXXFDyo0pYR5LIr5NLg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q26BqyP8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2352/1%2A08qEXXFDyo0pYR5LIr5NLg.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FTPDw8V6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ArIcud7hG7bkF0t5zqkm6pA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FTPDw8V6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ArIcud7hG7bkF0t5zqkm6pA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hi! I’m Richi&lt;br&gt;
programmer, developer or whatever you want!&lt;br&gt;
If you want to have your personal web page, your company needs a web page, you have an idea and you want to turn it into reality, you want to sell your products online, turn your business into online you have a problem in your current page, you need to update it, you want to migrate from hosting. If you have a physical shop or you are an entrepreneur or you have an idea or you have a problem to solve or simply want to chat.&lt;br&gt;
&lt;a href="https://richi.codes"&gt;https://richi.codes&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
