<?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>Forem: Mauro Garcia</title>
    <description>The latest articles on Forem by Mauro Garcia (@mauro_codes).</description>
    <link>https://forem.com/mauro_codes</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%2F61298%2F5b6eaa26-8727-47ea-8a94-b7d46951a9f7.PNG</url>
      <title>Forem: Mauro Garcia</title>
      <link>https://forem.com/mauro_codes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mauro_codes"/>
    <language>en</language>
    <item>
      <title>Building a mobile authentication flow for your SaaS with Expo and Supabase</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Thu, 25 May 2023 13:46:00 +0000</pubDate>
      <link>https://forem.com/mauro_codes/building-a-mobile-authentication-flow-for-your-saas-with-expo-and-supabase-3icd</link>
      <guid>https://forem.com/mauro_codes/building-a-mobile-authentication-flow-for-your-saas-with-expo-and-supabase-3icd</guid>
      <description>&lt;p&gt;Expo is an invaluable tool when it comes to developing mobile apps, offering a rich SDK with a wide range of packages. With services like EAS Build, the process of publishing your app becomes effortless. However, if your goal is to create a SaaS (Software as a Service), it becomes essential to have a backend for functionalities such as authentication and information storage. &lt;/p&gt;

&lt;p&gt;In such cases, you may consider using Supabase as your backend solution. Supabase provides a seamless way to handle authentication, data storage, and more, complementing Expo's frontend capabilities to create a robust and scalable mobile app for a SaaS.&lt;/p&gt;

&lt;h1&gt;
  
  
  What do you get from this tutorial?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MEsm03uK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/2PxId3S.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MEsm03uK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/2PxId3S.png" alt="https://i.imgur.com/2PxId3S.png" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new Supabase project with everything configured to handle authentication.&lt;/li&gt;
&lt;li&gt;A working Expo app integrated with Supabase.

&lt;ul&gt;
&lt;li&gt;A global Supabase context with easy access to interact with the Supabase client&lt;/li&gt;
&lt;li&gt;React-navigation setup for all the routes. You get IntelliSense for route names.&lt;/li&gt;
&lt;li&gt;Four working screens (Login, Register, Forgot Password, Home)&lt;/li&gt;
&lt;li&gt;Route security setup (only authenticated users can access the Home route).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Login flow using Supabase auth.

&lt;ul&gt;
&lt;li&gt;Your session info is securely persisted locally using Expo Secure Store.&lt;/li&gt;
&lt;li&gt;Automatic refresh token flow&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Register flow&lt;/li&gt;
&lt;li&gt;Forgot Password flow&lt;/li&gt;
&lt;li&gt;Setup to read environment variables from a &lt;code&gt;.env&lt;/code&gt; file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Expo-Supabase template is now available with SpiroKit!
&lt;/h1&gt;

&lt;p&gt;For this demo app, I'll be using &lt;a href="https://bit.ly/3Ea1TDq"&gt;SpiroKit&lt;/a&gt;, which is a React Native UI kit I built. Given that is a paid product, feel free to follow this tutorial with your own UI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bit.ly/3Ea1TDq"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XhdN4iAG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/MyOHaEv.png" alt="" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With SpiroKit, you can use our new &lt;code&gt;expo-supabase-typescript-template&lt;/code&gt;. It includes everything you’ll see in this tutorial.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a new Supabase project
&lt;/h1&gt;

&lt;p&gt;Supabase is an open-source project that offers a range of functionalities for hosting projects in the cloud. As of the time of writing, it allows users to host up to 2 projects in their free tier. If you have exceeded this quota, an alternative option is to host your own instance on a dedicated server. However, for the sake of simplicity, we will focus on utilizing the cloud project setup in this tutorial. Setting up a dedicated server falls outside the scope of this tutorial and will not be covered in detail.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visit &lt;a href="https://supabase.com"&gt;https://supabase.com&lt;/a&gt; and sign up if you don’t have an account&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once your account is ready, create your first project:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WG9EEpPs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/s2q4Xep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WG9EEpPs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/s2q4Xep.png" alt="Supabase new project button" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose a name for your project and a strong password. Make sure you are using the “Free” pricing plan if you are experimenting. You can update to a paid plan later if it’s required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B7uDi9ni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/cZdL8FA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B7uDi9ni--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/cZdL8FA.png" alt="Supabase new project form" width="791" height="749"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hit the “Create new project” to confirm. If everything goes right, you’ll be redirected to the home page of your new Supabase project. You’ll need to copy the Project URL and the API key (anon) later to connect your project with your Expo app&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---aqiKxJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/dIzdq8q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---aqiKxJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/dIzdq8q.png" alt="Supabase tokens" width="800" height="413"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Setting up authentication on Supabase
&lt;/h1&gt;

&lt;p&gt;Every Supabase project comes with a full Postgres database. We’ll be using it to support our basic authentication flow with email and password.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;From your supabase project dashboard, use the sidebar to visit the “SQL Editor” section&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--knChij79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/27QRG13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--knChij79--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/27QRG13.png" alt="Supabase SQL Editor" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under the “Quick Start” section, you’ll find the “User Management Starter” card. This will help us setup all the required tables for the auth flow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You can click the “Run” button to execute the query as is, or you can make a few modifications before execution based on your needs. This script will perform the following tasks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create Table&lt;/strong&gt;: Defines a table called &lt;code&gt;profiles&lt;/code&gt; with various columns to store information about public profiles, such as ID, updated timestamp, username, full name, avatar URL, and website. It also includes a constraint to ensure that the username length is at least 3 characters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up Row Level Security (RLS)&lt;/strong&gt;: Enables Row Level Security for the &lt;code&gt;profiles&lt;/code&gt; table. RLS allows controlling access to individual rows based on policies. If you want lo learn more about this powerful feature, &lt;a href="https://supabase.com/docs/guides/auth/row-level-security"&gt;visit the following link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create Policies&lt;/strong&gt;: Defines three policies to control access to the &lt;code&gt;profiles&lt;/code&gt; table:

&lt;ul&gt;
&lt;li&gt;"&lt;strong&gt;Public profiles are viewable by everyone.&lt;/strong&gt;": Grants read access to all rows in the &lt;code&gt;profiles&lt;/code&gt; table.&lt;/li&gt;
&lt;li&gt;"&lt;strong&gt;Users can insert their own profile.&lt;/strong&gt;": Allows users to insert a row into the &lt;code&gt;profiles&lt;/code&gt; table only if their authenticated user ID matches the "id" column.&lt;/li&gt;
&lt;li&gt;"&lt;strong&gt;Users can update their own profile.&lt;/strong&gt;": Permits users to update their own profile by matching their authenticated user ID with the "id" column.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a function and a Trigger&lt;/strong&gt;: Sets up a trigger function named "handle_new_user" and a trigger named "on_auth_user_created" to automatically create a profile entry when a new user signs up via Supabase Auth (we’ll use this on our Expo app later). The trigger function extracts relevant information from the newly created user and inserts it into the &lt;code&gt;profiles&lt;/code&gt; table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set up Storage&lt;/strong&gt;: Inserts a row into the &lt;code&gt;storage.buckets&lt;/code&gt; table to define a bucket named "avatars" for storing avatar images.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create Storage Policies&lt;/strong&gt;: Defines two policies to control access to the "avatars" bucket in storage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Avatar images are publicly accessible.": Allows anyone to retrieve (select) objects from the "avatars" bucket.&lt;/li&gt;
&lt;li&gt;"Anyone can upload an avatar.": Permits anyone to insert (upload) objects into the "avatars" bucket.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For simplicity, I’ll execute the script as is.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;We can now visit the “Table Editor” section using the sidebar and check that the &lt;code&gt;profiles&lt;/code&gt; table was created&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SDZeMAER--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/vOjViLb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SDZeMAER--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/vOjViLb.png" alt="Supabase - Check that the tables were created" width="800" height="189"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Creating an Expo app
&lt;/h1&gt;

&lt;p&gt;Now that we are done with Supabase, it’s time to create our Expo app.&lt;/p&gt;

&lt;p&gt;Because I’m using &lt;a href="https://spirokit.com"&gt;SpiroKit&lt;/a&gt;, I’ll be using the Expo Starter template that already comes with everything setup and ready to use. If you choose to also use SpiroKit, make sure to &lt;a href="https://maurocodes.gumroad.com/l/spirokit-figma-react-native"&gt;get your license&lt;/a&gt; and follow the &lt;a href="https://docs.spirokit.com/?path=/docs/getting-started-installation--page"&gt;installation instructions&lt;/a&gt; before running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-spirokit-app &lt;span class="nt"&gt;--template&lt;/span&gt; expo-template-typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to create a plain React Native app with Expo, run this command instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-native-app &lt;span class="nt"&gt;-t&lt;/span&gt; with-typescript

&lt;span class="c"&gt;# This is optional if you want to add icons to your screens. &lt;/span&gt;
&lt;span class="c"&gt;# It's already included with the SpiroKit template&lt;/span&gt;
yarn add react-native-heroicons
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Setting up Supabase in your Expo app
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You will need to run the following command to install all the required packages&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add @supabase/supabase-js @react-native-async-storage/async-storage react-native-url-polyfill

&lt;span class="c"&gt;# Required for accessing env variables during development&lt;/span&gt;
yarn add &lt;span class="nt"&gt;-D&lt;/span&gt; babel-plugin-inline-dotenv 

&lt;span class="c"&gt;# Required to encrypt the information in the device&lt;/span&gt;
npx expo &lt;span class="nb"&gt;install &lt;/span&gt;expo-secure-store
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Because we are using &lt;a href="https://docs.expo.dev/versions/latest/sdk/securestore"&gt;Expo Secure Store&lt;/a&gt; later to store information, we will need to update our &lt;code&gt;app.json&lt;/code&gt; file to avoid issues with App Store Connect during app submission. We will set the &lt;code&gt;usesNonExemptEncryption&lt;/code&gt; option to &lt;code&gt;false&lt;/code&gt; like this: ****&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"expo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ios"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"config"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"usesNonExemptEncryption"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Setting this property automatically handles the compliance information prompt, as described in the &lt;a href="https://docs.expo.dev/versions/latest/sdk/securestore/#exempting-encryption-prompt"&gt;Expo docs&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now, let’s create a &lt;code&gt;SupabaseContext&lt;/code&gt; that will allow us to get interact with the supabase client from any screen of our app. Run the following commands to create the src folder, then the context folder inside, and finally, a few empty files to implement our context.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;src
&lt;span class="nb"&gt;mkdir &lt;/span&gt;src/context
&lt;span class="nb"&gt;touch&lt;/span&gt; ./src/context SupabaseContext.tsx
&lt;span class="nb"&gt;touch&lt;/span&gt; ./src/context SupabaseProvider.tsx
&lt;span class="nb"&gt;touch&lt;/span&gt; ./src/context useSupabase.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;SupabaseContext.tsx&lt;/code&gt; will define the contract for the provider. We’ll add a &lt;code&gt;isLoggedIn&lt;/code&gt; flag to easily check the session status, and a few methods to interact with Supabase auth service&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;SupabaseContextProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;forgotPassword&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SupabaseContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createContext&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SupabaseContextProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;forgotPassword&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, add the following code to the &lt;code&gt;SupabaseProvider.tsx&lt;/code&gt; file to initialize the Supabase client and implement all the required methods. We also need the &lt;code&gt;isNavigationReady&lt;/code&gt; to load our navigation stack after the session info is available. That way, we can hide certain routes for anonymous users.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-url-polyfill/auto&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@supabase/supabase-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;SecureStore&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-secure-store&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SupabaseContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./SupabaseContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// We are using Expo Secure Store to persist session info&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ExpoSecureStoreAdapter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;SecureStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getItemAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;SecureStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setItemAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;removeItem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;SecureStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deleteItemAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;SupabaseProviderProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSX&lt;/span&gt;&lt;span class="p"&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;JSX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SupabaseProvider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SupabaseProviderProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoggedIn&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isNavigationReady&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setNavigationReady&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SUPABASE_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SUPABASE_ANON_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ExpoSecureStoreAdapter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;autoRefreshToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;persistSession&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;detectSessionInUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signInWithPassword&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;setLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;register&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signUp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;forgotPassword&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resetPasswordForEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;logout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signOut&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;setLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;checkIfUserIsLoggedIn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getSession&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;setLoggedIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;setNavigationReady&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;checkIfUserIsLoggedIn&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SupabaseContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Provider&lt;/span&gt;
      &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;forgotPassword&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;logout&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isNavigationReady&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/SupabaseContext.Provider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally, we’ll use the &lt;code&gt;useSupabase.tsx&lt;/code&gt; file to create a convenient hook:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SupabaseContext&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./SupabaseContext&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SupabaseContext&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Because we are using TypeScript, we’ll also need to create a &lt;code&gt;app.d.ts&lt;/code&gt; to define the types for our environment variables&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;touch&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ts&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Now let’s add our environment variables to the declaration file&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app.d.ts&lt;/span&gt;
&lt;span class="kr"&gt;declare&lt;/span&gt; &lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nx"&gt;NodeJS&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;ProcessEnv&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;SUPABASE_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;SUPABASE_ANON_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;blockquote&gt;
&lt;p&gt;If you still have typescript errors on your hook, run the “reload window” command in VSCode, or just close and open the IDE to refresh everything.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To properly get access to our environment variables during development, we need to update our &lt;code&gt;babel.config.js&lt;/code&gt; file to add the “inline-dotenv” plugin. It should look like this:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;presets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;babel-preset-expo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inline-dotenv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="c1"&gt;// -&amp;gt; Required to read env variables&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;We’ll also need to create the &lt;code&gt;.env&lt;/code&gt; file in the root of our project and provide a value for the &lt;code&gt;SUPABASE_URL&lt;/code&gt; and &lt;code&gt;SUPABASE_ANON_KEY&lt;/code&gt; variables:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;touch&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```typescript
SUPABASE_URL="YOUR_SUPABASE_URL"
SUPABASE_ANON_KEY="YOUR_SUPABASE_KEY"
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; If you already run your app before creating the `.env` file, please run the app with the `expo r -c` command to clear the expo cache. Otherwise, your environment variables won’t work. This is required every time the `.env` file is updated.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  Setting up React Navigation
&lt;/h1&gt;

&lt;p&gt;Because we are adding a few screens like &lt;code&gt;Login&lt;/code&gt;, &lt;code&gt;Register&lt;/code&gt;, &lt;code&gt;ForgotPassword&lt;/code&gt;, and &lt;code&gt;Home&lt;/code&gt;, we will need to add React Navigation to easily navigate through the screens.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Let’s start by installing the required dependencies&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx expo &lt;span class="nb"&gt;install&lt;/span&gt; @react-navigation/native @react-navigation/stack react-native-gesture-handler
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I’ll create a &lt;code&gt;navigation&lt;/code&gt; folder to store all the required components here. But feel free to choose a different location for your files&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;navigation
&lt;span class="nb"&gt;touch &lt;/span&gt;navigation/GlobalNavigation.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We’ll also need to create a few dummy screens&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;screens
&lt;span class="nb"&gt;touch &lt;/span&gt;screens/LoginScreen.tsx
&lt;span class="nb"&gt;touch &lt;/span&gt;screens/RegisterScreen.tsx
&lt;span class="nb"&gt;touch &lt;/span&gt;screens/ForgotPasswordScreen.tsx
&lt;span class="nb"&gt;touch &lt;/span&gt;screens/HomeScreen.tsx
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;For all the screens, let’s add a temp UI&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// screens/LoginScreen.tsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LoginScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Box&lt;/span&gt; &lt;span class="nx"&gt;safeArea&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Login&lt;/span&gt; &lt;span class="nx"&gt;Screen&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LargeTitle&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Box&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;LoginScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// screens/RegisterScreen.tsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RegisterScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Box&lt;/span&gt; &lt;span class="nx"&gt;safeArea&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Register&lt;/span&gt; &lt;span class="nx"&gt;Screen&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LargeTitle&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Box&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;RegisterScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// screens/ForgotPasswordScreen.tsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Box&lt;/span&gt; &lt;span class="nx"&gt;safeArea&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Forgot&lt;/span&gt; &lt;span class="nx"&gt;Password&lt;/span&gt; &lt;span class="nx"&gt;Screen&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LargeTitle&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Box&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// screens/HomeScreen.tsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;HomeScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Box&lt;/span&gt; &lt;span class="nx"&gt;safeArea&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Home&lt;/span&gt; &lt;span class="nx"&gt;Screen&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LargeTitle&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Box&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;HomeScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now that we have all our screens, we can go back to the &lt;code&gt;GlobalNavigation.tsx&lt;/code&gt; file and add the Stack navigation with all our screens&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// navigation/GlobalNavigation.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NavigationContainer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createStackNavigator&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/stack&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../screens/ForgotPasswordScreen&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;HomeScreen&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../screens/HomeScreen&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;LoginScreen&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../screens/LoginScreen&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;RegisterScreen&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../screens/RegisterScreen&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../context/useSupabase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Stack&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createStackNavigator&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;GlobalNavigation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// We check if the user is logged in&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NavigationContainer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Navigator&lt;/span&gt;
        &lt;span class="nx"&gt;initialRouteName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;screenOptions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;headerShown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Only authenticated users can access the home */&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Screen&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;HomeScreen&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Screen&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LoginScreen&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Screen&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Register&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;RegisterScreen&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Screen&lt;/span&gt;
              &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ForgotPassword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="p"&gt;)}&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Stack.Navigator&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/NavigationContainer&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;GlobalNavigation&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, we need to update our &lt;code&gt;App.tsx&lt;/code&gt; file to add our supabase context and our new global navigation.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SpiroKitProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;usePoppins&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useSpiroKitTheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;GlobalNavigation&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/navigation/GlobalNavigation&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SupabaseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/context/SupabaseProvider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;myTheme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSpiroKitTheme&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fontLoaded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;usePoppins&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;fontLoaded&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SpiroKitProvider&lt;/span&gt; &lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;myTheme&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SupabaseProvider&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;GlobalNavigation&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/GlobalNavigation&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/SupabaseProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/SpiroKitProvider&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Finally, let’s create a &lt;code&gt;GlobalParamList.tsx&lt;/code&gt; inside our navigation folder to add proper IntelliSense to our routes while using &lt;code&gt;navigation.navigate("routeName")&lt;/code&gt; to move between screens&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;navigation/GlobalParamList.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```typescript
import { StackNavigationProp } from "@react-navigation/stack";

export type GlobalParamList = {
  Home: undefined;
  Login: undefined;
  Register: undefined;
  ForgotPassword: undefined;
};

export type ScreenNavigationProp = StackNavigationProp&amp;lt;GlobalParamList&amp;gt;;

declare global {
  namespace ReactNavigation {
    interface RootParamList extends GlobalParamList {}
  }
}
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Updating the Login screen
&lt;/h1&gt;

&lt;p&gt;With the Supabase context set and our navigation stack in place, we need to update all the different screens. Let’s start with the Login with a few comments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We are using the &lt;code&gt;useSupabase&lt;/code&gt; hook to call the &lt;code&gt;login&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;We wrap the screen with a &lt;code&gt;KeyboardAvoidingView&lt;/code&gt; to prevent annoying issues with the keyboard (this applies to all our screens below)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// screens/LoginScreen.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Pressable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TitleTwo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;LockClosedIcon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;MailIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/elements&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../context/useSupabase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LoginScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPassword&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onSignInTapped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;
      &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;keyboardVerticalOffset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;backgroundColor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryGray.100&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;behavior&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OS&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;padding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;height&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="nx"&gt;contentContainerStyle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;flexGrow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;safeAreaTop&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;marginTop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
              &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/FawVClJ.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
              &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;resizeMode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;contain&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Image&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;TitleTwo&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/TitleTwo&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;
              &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter your email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;MailIcon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onChangeText&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;
              &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter your password&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;secureTextEntry&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LockClosedIcon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onChangeText&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Pressable&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ForgotPassword&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Subhead&lt;/span&gt; &lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;right&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;paddingBottom&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nx"&gt;Forgot&lt;/span&gt; &lt;span class="nx"&gt;Password&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Subhead&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Pressable&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;
              &lt;span class="nx"&gt;isDisabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;onSignInTapped&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
              &lt;span class="nx"&gt;marginBottom&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Loading...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sign in&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;backgroundColor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;safeAreaBottom&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nx"&gt;Have&lt;/span&gt; &lt;span class="nx"&gt;an&lt;/span&gt; &lt;span class="nx"&gt;account&lt;/span&gt;&lt;span class="p"&gt;?{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Pressable&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Register&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;textDecorationLine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;underline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="nx"&gt;up&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Pressable&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ScrollView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/KeyboardAvoidingView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;LoginScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Updating the Register screen
&lt;/h1&gt;

&lt;p&gt;With the Login screen done, let’s work on the register screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// screens/RegisterScreen.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Pressable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TitleTwo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;LockClosedIcon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;MailIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/elements&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../context/useSupabase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;RegisterScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setPassword&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;register&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onSignUpTapped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;register&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;
      &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;keyboardVerticalOffset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;backgroundColor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryGray.100&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;behavior&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OS&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;padding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;height&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="nx"&gt;contentContainerStyle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;flexGrow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt;
          &lt;span class="nx"&gt;safeAreaTop&lt;/span&gt;
          &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="nx"&gt;alignItems&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex-start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;marginTop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
              &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/oNY0QGb.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
              &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Register icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;resizeMode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;contain&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Image&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;TitleTwo&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="nx"&gt;up&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/TitleTwo&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;
              &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter your email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;MailIcon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onChangeText&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;
              &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter your password&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;secureTextEntry&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LockClosedIcon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onChangeText&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;
              &lt;span class="nx"&gt;isDisabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;marginBottom&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;onSignUpTapped&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Loading...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sign up&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;safeAreaBottom&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nx"&gt;If&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="nx"&gt;have&lt;/span&gt; &lt;span class="nx"&gt;an&lt;/span&gt; &lt;span class="nx"&gt;account&lt;/span&gt;&lt;span class="p"&gt;,{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Pressable&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;textDecorationLine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;underline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Pressable&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ScrollView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/KeyboardAvoidingView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;RegisterScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Updating the Forgot Password screen
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;We are using the &lt;code&gt;useSupabase&lt;/code&gt; hook to call the &lt;code&gt;forgotPassword&lt;/code&gt; method&lt;/li&gt;
&lt;li&gt;We are using an &lt;code&gt;Alert&lt;/code&gt; component to show a message after the recovery email was sent.&lt;/li&gt;
&lt;li&gt;Feel free to improve the error handling in the &lt;code&gt;onSendTapped&lt;/code&gt; to show a custom error if something goes wrong.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// screens/ForgotPasswordScreen.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Pressable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TitleTwo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Alert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TitleOne&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MailIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/elements&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../context/useSupabase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useNavigation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useHeaderHeight&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;showResultModal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setShowResultModal&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;forgotPassword&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onFinishTapped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;setShowResultModal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;onSendTapped&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;forgotPassword&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;setShowResultModal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;setLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;KeyboardAvoidingView&lt;/span&gt;
      &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;keyboardVerticalOffset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;backgroundColor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryGray.100&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="nx"&gt;behavior&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OS&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ios&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;padding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;height&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="nx"&gt;contentContainerStyle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;flexGrow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt;
          &lt;span class="nx"&gt;safeAreaTop&lt;/span&gt;
          &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="nx"&gt;alignItems&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex-start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;marginTop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
              &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/sDzRjS4.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
              &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Forgot password icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;resizeMode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;contain&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Image&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;TitleTwo&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Forgot&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/TitleTwo&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Input&lt;/span&gt;
              &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Enter your email&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
              &lt;span class="nx"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;MailIcon&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onChangeText&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt;
              &lt;span class="nx"&gt;isDisabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;marginBottom&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
              &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;onSendTapped&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Loading...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Send&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;safeAreaBottom&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nx"&gt;If&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="nx"&gt;have&lt;/span&gt; &lt;span class="nx"&gt;an&lt;/span&gt; &lt;span class="nx"&gt;account&lt;/span&gt;&lt;span class="p"&gt;,{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Pressable&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;navigation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;navigate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="nx"&gt;fontWeight&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;textDecorationLine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;underline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="nx"&gt;Sign&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Pressable&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Body&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Alert&lt;/span&gt;
          &lt;span class="nx"&gt;isVisible&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;showResultModal&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="nx"&gt;onClose&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setShowResultModal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
          &lt;span class="nx"&gt;TitleComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;TitleOne&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Email&lt;/span&gt; &lt;span class="nx"&gt;sent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/TitleOne&amp;gt;&lt;/span&gt;&lt;span class="err"&gt;}
&lt;/span&gt;          &lt;span class="nx"&gt;ConfirmButtonComponent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;onFinishTapped&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Ok&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Alert&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/ScrollView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/KeyboardAvoidingView&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;ForgotPasswordScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Updating the Home Screen
&lt;/h1&gt;




&lt;ul&gt;
&lt;li&gt;Primarily used to test routing security and allow users to &lt;code&gt;logout&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;After logout, the Supabase Context is updated, and the Global Navigation will trigger a re-render. The user is automatically redirected to the &lt;code&gt;Login&lt;/code&gt; screen.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// screens/Home.tsx&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../context/useSupabase&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;HomeScreen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;logout&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useSupabase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="nx"&gt;space&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;safeArea&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;flex&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;justifyContent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Welcome&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/LargeTitle&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
        &lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/k78EnxY.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}}&lt;/span&gt;
        &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;resizeMode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;contain&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Image&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;onPress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Logout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/VStack&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;HomeScreen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Final thoughts
&lt;/h1&gt;

&lt;p&gt;That was an intense article! But I wanted to cover the entire flow. There are many things we could improve or add, but I’m thinking of building a series around it. We could add a working example retrieving information from Supabase db or include additional auth mechanisms.&lt;/p&gt;

&lt;p&gt;I would love to hear your thoughts! Your input can help me shape the upcoming articles.&lt;/p&gt;

</description>
      <category>expo</category>
      <category>reactnative</category>
      <category>supabase</category>
    </item>
    <item>
      <title>6 React Native UI Kits for 2023</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Wed, 30 Nov 2022 22:53:00 +0000</pubDate>
      <link>https://forem.com/mauro_codes/6-react-native-ui-kits-for-2023-3h8a</link>
      <guid>https://forem.com/mauro_codes/6-react-native-ui-kits-for-2023-3h8a</guid>
      <description>&lt;h1&gt;
  
  
  Building apps take time
&lt;/h1&gt;

&lt;p&gt;Building a mobile app is a challenging task. From coming up with an idea, prototyping, and finally building the app, there are many things to consider and problems we'll have to figure out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do we make sure the entire app looks consistent?&lt;/li&gt;
&lt;li&gt;Do we need to support dark mode?&lt;/li&gt;
&lt;li&gt;Should the app feel like an iOS or an Android app? Maybe something in between.&lt;/li&gt;
&lt;li&gt;Is our app accessible and inclusive?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are building everything from scratch, you may need years of design experience to create something that looks consistent and, at the same time, has a clear answer to all the questions we mentioned early. On the other hand, building an accessible app with dark mode support and a cohesive look and feel takes a lot of time.&lt;/p&gt;

&lt;h1&gt;
  
  
  React Native UI Kits
&lt;/h1&gt;

&lt;p&gt;We already established that building a mobile app from scratch is challenging and takes time. The good news is that there's a solution for that problem: We can use a React Native UI Kit.&lt;/p&gt;

&lt;p&gt;A UI kit is a collection of assets containing design elements such as UI components, styles, and rules. UI components are elements that convey meaning and provide functionality to users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should we use a React Native UI Kit?
&lt;/h2&gt;

&lt;p&gt;UI kits can help you improve a design and development workflow in many ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed up the design and build processes: We can rely on ready-to-use UI elements from the kit instead of creating our own elements.&lt;/li&gt;
&lt;li&gt;Time to market: We can ship faster and test our ideas by drastically reducing the design and development phases.&lt;/li&gt;
&lt;li&gt;Don't reinvent the wheel: As developers and entrepreneurs, we aim to solve a critical problem for our users. Therefore, we should focus our time and energy on solving that problem instead of creating a custom interface.&lt;/li&gt;
&lt;li&gt;Achieve consistency in your app: The design elements from a UI kit have a consistency that can be hard to achieve if you are building everything from scratch.&lt;/li&gt;
&lt;li&gt;Become a better designer: UI kits allow us to inspect the different elements and learn from them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Best React Native UI Kits
&lt;/h1&gt;

&lt;p&gt;Here's a list of the best React Native UI kits you can use to build your next app.&lt;/p&gt;

&lt;h2&gt;
  
  
  SpiroKit
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fnocxl8jqx185xyjw43et.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.amazonaws.com%2Fuploads%2Farticles%2Fnocxl8jqx185xyjw43et.png" alt="spirokit ui kit - banner" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A library with more than one year in the making. SpiroKit is not only a UI Kit but a complete toolkit for indie hackers that includes: Figma templates, UI Kit, Boilerplates &amp;amp; App templates.&lt;/p&gt;

&lt;p&gt;It comes with 17 ready-to-use color palettes combined with three shades of gray (warm, neutral, and cool). Besides, it includes a global ThemeProvider that allows you to add your own color palette, custom fonts, and much more!&lt;/p&gt;

&lt;p&gt;Every component comes with dark mode support, meaning that you don't need to do anything besides implementing a simple toggle for your users.&lt;/p&gt;

&lt;p&gt;SpiroKit also includes a complete documentation portal built with StorybookJS, where you can copy-paste hundreds of working code examples.&lt;/p&gt;

&lt;p&gt;This is a paid product, but we support Purchase Power Parity, so if you are interested, check out the landing page to see if you are eligible for a discount.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://spirokit.com" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spirokit.com" rel="noopener noreferrer"&gt;Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  React Native Elements
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fic666ockernnklfmpril.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.amazonaws.com%2Fuploads%2Farticles%2Fic666ockernnklfmpril.png" alt="react native elements - ui kit - banner" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is easily one of the more popular options available.&lt;br&gt;
It's open source and has its own VSCode Extension for snippets with preview and auto import. About customization, it includes a global &lt;code&gt;ThemeProvider&lt;/code&gt; that you can use to setup your own theme from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;23k stars on GitHub&lt;/li&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/react-native-elements/react-native-elements" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactnativeelements.com/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  NativeBase
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fx97kv14p1525breg1q9f.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.amazonaws.com%2Fuploads%2Farticles%2Fx97kv14p1525breg1q9f.png" alt="native base ui kit - banner" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NativeBase is an accessible, utility-first component library that helps you build consistent UI across Android, iOS, and Web.&lt;/p&gt;

&lt;p&gt;This is another excellent library with tons of customization options, a global theme provider, powerful hooks that allows you to quickly implement dark mode support on your components, app boilerplates, and much more.&lt;/p&gt;

&lt;p&gt;One thing I love about NativeBase is that it's powered by &lt;a href="https://react-native-aria.geekyants.com/" rel="noopener noreferrer"&gt;React Native Aria&lt;/a&gt;, which provides React hooks that enable you to build accessible design systems in no time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;18.6k stars on GitHub&lt;/li&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/GeekyAnts/nativebase" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nativebase.io/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.nativebase.io/" rel="noopener noreferrer"&gt;Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  React Native Paper
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fhjh78w93q8jdd1lmzqtg.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.amazonaws.com%2Fuploads%2Farticles%2Fhjh78w93q8jdd1lmzqtg.png" alt="react native paper - ui kit - banner" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another popular kit. It's cross-platform but based on Google's Material Design guidelines.&lt;br&gt;
It has a default theme, but you can implement your own using the global ThemeProvider.&lt;/p&gt;

&lt;p&gt;It also includes a documentation portal with all you need to setup your project. &lt;/p&gt;

&lt;p&gt;One thing to notice is that this kit doesn't have app boilerplates, so you must go through the installation process to add this UI kit to your projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;10k stars on GitHub&lt;/li&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/callstack/react-native-paper" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactnativepaper.com/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  UI Kitten
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fnvxp2py5iwubus0vynm8.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.amazonaws.com%2Fuploads%2Farticles%2Fnvxp2py5iwubus0vynm8.png" alt="ui kitten - react native ui kit - banner" width="800" height="369"&gt;&lt;/a&gt;&lt;br&gt;
A beautiful cross-platform UI Kit based on &lt;a href="https://eva.design/" rel="noopener noreferrer"&gt;Eva Design System&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It also includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete documentation portal with examples to copy/paste&lt;/li&gt;
&lt;li&gt;App boilerplates&lt;/li&gt;
&lt;li&gt;ThemeProvider and light/dark mode support&lt;/li&gt;
&lt;li&gt;You can build your own themes.&lt;/li&gt;
&lt;li&gt;It has its own icon pack with 480 icons (based on Eva Design System).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;9.4k stars on GitHub&lt;/li&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/akveo/react-native-ui-kitten" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://akveo.github.io/react-native-ui-kitten/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tamagui
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fm2qaddv4ng9nyejegbrz.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fm2qaddv4ng9nyejegbrz.jpg" alt="tamagui UI kit - banner" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This is still in early beta, meaning you may have to deal with breaking changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A style system, UI kit, and optimizing compiler for React Native &amp;amp; Web&lt;/p&gt;

&lt;p&gt;A cross-platform UI Kit for Universal apps with a fantastic innovation: It's also a compiler that optimizes the output on build time. If you are familiar with Svelte, this is similar but for universal apps with React Native.&lt;/p&gt;

&lt;p&gt;This kit also has a core package (@tamagui/core), which is a good option if you want to build your own design system with a solid foundation.&lt;/p&gt;

&lt;p&gt;It includes excellent documentation, and the team behind this project is moving fast. So keep an eye on this project in 2023.&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources &amp;amp; stats
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;2.8k stars on GitHub&lt;/li&gt;
&lt;li&gt;Links:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tamagui/tamagui" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tamagui.dev/" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tamagui.dev/docs/intro/introduction" rel="noopener noreferrer"&gt;Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;



&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;The React Native ecosystem is constantly evolving, with many unique projects like those mentioned above.&lt;/p&gt;

&lt;p&gt;Here are a few questions you should ask yourself before choosing the best option for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do I need complete control to customize every component?&lt;/li&gt;
&lt;li&gt;How much time do I have to build my next app?&lt;/li&gt;
&lt;li&gt;Do I want to build my own theme / define my color palette?&lt;/li&gt;
&lt;li&gt;Is it easy to implement? Does it include good documentation?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on your answers, you'll find the best solution for your specific situation.&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>ui</category>
    </item>
    <item>
      <title>Bridging the gap between web &amp; native with Expo router</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Wed, 26 Oct 2022 21:06:00 +0000</pubDate>
      <link>https://forem.com/mauro_codes/bridging-the-gap-between-web-native-with-expo-router-1c7d</link>
      <guid>https://forem.com/mauro_codes/bridging-the-gap-between-web-native-with-expo-router-1c7d</guid>
      <description>&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;Historically speaking, trying to handle navigation on a universal app (that targets web and mobile) was a pain in the ass.&lt;/p&gt;

&lt;p&gt;Navigation on the web usually is quite simple, and Next.js did a fantastic job with its file system-based router.&lt;/p&gt;

&lt;p&gt;In mobile land, things are not that simple. &lt;a href="https://twitter.com/FernandoTheRojo" rel="noopener noreferrer"&gt;Fernando Rojo&lt;/a&gt; did a fantastic job with &lt;a href="https://solito.dev/" rel="noopener noreferrer"&gt;Solito&lt;/a&gt;, which is a wrapper around React Navigation and Next.js that lets you share navigation code across platforms. This project gained a lot of traction, and the community started to work on solving the problem of navigation for universal apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing Expo Router
&lt;/h3&gt;

&lt;p&gt;I heard about Expo Router a few months ago, and I instantly loved the concept:&lt;br&gt;
What if we could have something like Next.js file-system-based router, but for universal apps? That is Expo Router.&lt;/p&gt;
&lt;h3&gt;
  
  
  What's the big deal about this library?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;"Expo Router brings the best routing concepts from the web to native iOS and Android apps. Every file in the app directory automatically becomes a route in your mobile navigation, making it easier than ever to build, maintain, and scale your project."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you've had to deal with deep linking on your mobile apps in the past, you already know that this is another major pain.&lt;/p&gt;

&lt;p&gt;Expo Router was built on top of &lt;a href="https://reactnavigation.org/" rel="noopener noreferrer"&gt;React Navigation&lt;/a&gt;, and the entire deep linking system is automatically generated, meaning that you can share the same link on the web and mobile, and the deep link will automatically work 🤯.&lt;/p&gt;

&lt;p&gt;No more weird mapping and matching routes.&lt;/p&gt;

&lt;p&gt;There are tons of additional features like Offline support, but if you want to learn more about all these features, here's the &lt;a href="https://expo.github.io/router/docs" rel="noopener noreferrer"&gt;official docs&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given that this library is still in beta, some links may change&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Building a magazine app
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fdm6mxv85c178krdfvnpu.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.amazonaws.com%2Fuploads%2Farticles%2Fdm6mxv85c178krdfvnpu.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to test features like tab and stack navigation to get a first sense of how it feels to work on a real app using Expo Router, so I decided to build a very simple magazine app that shows a list of news and allows the user to navigate to each news to read more about it.&lt;/p&gt;

&lt;p&gt;For this demo app, I'll be using &lt;a href="https://bit.ly/3tGv8sy" rel="noopener noreferrer"&gt;SpiroKit&lt;/a&gt;, which is a React Native UI kit I built. Given that is a paid product, feel free to follow this tutorial with your own UI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bit.ly/3tGv8sy" rel="noopener noreferrer"&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.amazonaws.com%2Fuploads%2Farticles%2Fnocxl8jqx185xyjw43et.png" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  Project setup
&lt;/h3&gt;
&lt;h4&gt;
  
  
  With SpiroKit
&lt;/h4&gt;

&lt;p&gt;If you've decided to use SpiroKit, follow these steps to quickly generate a new expo project with SpiroKit and Expo Router:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Get your SpiroKit license &lt;a href="https://bit.ly/3tGv8sy" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new project using the template&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;expo init my-app &lt;span class="nt"&gt;--template&lt;/span&gt; @spirokit/expo-router-template
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Add SpiroKit to your project: Download the &lt;code&gt;spirokit-core-[version].tgz&lt;/code&gt; file from Gumroad and add it to the root of your project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Install the package by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add ./spirokit-core-[version].tgz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  With your own UI
&lt;/h4&gt;

&lt;p&gt;Run the following command to create a new project with expo-router:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-react-native-app &lt;span class="nt"&gt;-t&lt;/span&gt; with-router
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  First use
&lt;/h3&gt;

&lt;p&gt;After creating my first project using the expo template, I just run &lt;code&gt;yarn start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;By default, the starter templates don't include the app folder, so there is nothing to show. But we will get a friendly welcome message that will let us create our first route by only clicking the “touch app/index.js” button&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.amazonaws.com%2Fuploads%2Farticles%2Fmacx0a2sey7p30q95c68.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.amazonaws.com%2Fuploads%2Farticles%2Fmacx0a2sey7p30q95c68.png" alt="welcome message from Expo for an empty app without routes" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking the button, I instantly got an update on all my devices (both web and mobile)&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.amazonaws.com%2Fuploads%2Farticles%2Fivxmqmcot1caumxh5cuq.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.amazonaws.com%2Fuploads%2Farticles%2Fivxmqmcot1caumxh5cuq.png" alt="welcome message from Expo after creating the first route" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After returning to my code, I confirmed that the new &lt;code&gt;app/index.js&lt;/code&gt; file was created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Stack&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;container&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Hello World&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtitle&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;This is the first page of your app.&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;main&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;maxWidth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;960&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;marginHorizontal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;auto&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;fontWeight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;subtitle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#38434D&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Given that Expo Router is file-system based, we'll need to create new directories and files based on our needs.&lt;/p&gt;

&lt;p&gt;My magazine app will use a bottom tab navigation with 2 main sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;News&lt;/li&gt;
&lt;li&gt;Settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the same time, the "News" section will use a Stack navigator to allow us to navigate to the details page. More about this below.&lt;/p&gt;

&lt;p&gt;Let's start building our app!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Adding the Tab navigator
&lt;/h3&gt;

&lt;p&gt;We need to add a tab navigator so we can navigate between the "news" and "settings" tabs.&lt;/p&gt;

&lt;p&gt;Expo Router includes a feature called "Layout Routes". From the &lt;a href="https://expo.github.io/router/docs/features/layout-routes" rel="noopener noreferrer"&gt;official docs&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"To render shared navigation elements like a header, tab bar, or drawer, you can use a Layout Route. If a directory contains a file named _layout.js, it will be used as the layout component for all the sibling files in the directory."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's create our &lt;code&gt;app/_layout.js&lt;/code&gt; and add the Tab navigation we need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/_layout.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SpiroKitProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;usePoppins&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useSpiroKitTheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Tabs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Setting up some global preferences for theming&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useSpiroKitTheme&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;primaryGray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coolGray&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;primaryDark&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coolDark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fontLoaded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;usePoppins&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;fontLoaded&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&amp;gt;&amp;lt;/&amp;gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Required for SpiroKit */&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SpiroKitProvider&lt;/span&gt; &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* This will add the Tabs navigator */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Tabs&lt;/span&gt; &lt;span class="na"&gt;screenOptions&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;headerShown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* This allows us to further customize any given route */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Tabs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Screen&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"index"&lt;/span&gt;
          &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// This tab will no longer show up in the tab bar.&lt;/span&gt;
            &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Tabs&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SpiroKitProvider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;I'm excluding the index route from the Tab Bar by setting the href to null. I just want "news" and "settings" to be included in the Tab Bar.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Updating the &lt;code&gt;app/index.js&lt;/code&gt; file
&lt;/h3&gt;

&lt;p&gt;With the tabs navigator in place, I wanted to have a welcome screen (&lt;code&gt;app/index.js&lt;/code&gt;), with a button that redirects to the news section.&lt;/p&gt;

&lt;p&gt;Expo Router provides many options to move between routes, but given that it's still in beta, some things may not be supported yet. In this case, I'm using the &lt;code&gt;useLink&lt;/code&gt; hook to move between routes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useLink&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HomeIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;VStack&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Page&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// The useLink hook allows us to navigate between routes&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useLink&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;
      &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;
      &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;linearGradient&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primary.600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;emerald.800&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
          &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
          &lt;span class="na"&gt;end&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;borderWidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;borderColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"primary.500"&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"full"&lt;/span&gt;
        &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://images.pexels.com/photos/1369476/pexels-photo-1369476.jpeg?auto=compress&amp;amp;cs=tinysrgb&amp;amp;w=1260&amp;amp;h=750&amp;amp;dpr=1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"white"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1/2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;textAlign&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        Welcome to magazine App
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Here I'm using the onPress event to trigger the navigation */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* This won't work until we create the news route below */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;
        &lt;span class="na"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"secondary"&lt;/span&gt;
        &lt;span class="na"&gt;textColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"white"&lt;/span&gt;
        &lt;span class="na"&gt;colorMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;HomeIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"auto"&lt;/span&gt;
        &lt;span class="na"&gt;onPress&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;news&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        Home
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After these changes, the welcome screen should look like this:&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.amazonaws.com%2Fuploads%2Farticles%2F6gte6snipfg9c98w7oz2.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.amazonaws.com%2Fuploads%2Farticles%2F6gte6snipfg9c98w7oz2.png" alt="Welcome screen after applying the UI updates" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Adding the "News" and "Settings" tabs
&lt;/h3&gt;

&lt;p&gt;Let's start by creating the &lt;code&gt;app/news&lt;/code&gt; and &lt;code&gt;app/settings&lt;/code&gt; directories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;news
&lt;span class="nb"&gt;mkdir &lt;/span&gt;settings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your project should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;├── app
│   ├── index.js
│   ├── _layout.js
│   ├── news
│   │   ├── Empty directory
│   └── settings
│   │   ├── Empty directory
├── app.json
├── babel.config.js
├── index.js
├── package.json
├── README.md
└── yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We'll also need to define which navigator to use on each tab. In this case, I decided to use stack navigators on each tab.&lt;br&gt;
Let's create the &lt;code&gt;index.js&lt;/code&gt; and &lt;code&gt;_layout.js&lt;/code&gt; files inside "news" and "settings" directories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch ./app/news/index.js ./app/news/_layout.js ./app/settings/index.js ./app/settings/_layout.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, your project structure should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;├── app
│   ├── index.js
│   ├── _layout.js
│   ├── news
│   │   ├── index.js
│   │   └── _layout.js
│   └── settings
│       ├── index.js
│       └── _layout.js
├── app.json
├── babel.config.js
├── index.js
├── package.json
├── README.md
└── yarn.lock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To add the stack navigators, add this to the &lt;code&gt;app/news/_layout.js&lt;/code&gt; and &lt;code&gt;app/settings/_layout.js&lt;/code&gt; files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/news/_layout.js&lt;/span&gt;
&lt;span class="c1"&gt;// app/settings/_layout.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Stack&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Layout&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Stack&lt;/span&gt; &lt;span class="na"&gt;screenOptions&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;headerShown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, let's customize the &lt;code&gt;app/news/index.js&lt;/code&gt; and &lt;code&gt;app/settings/index.js&lt;/code&gt; files to include a simple message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/news/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;News&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Center&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;News route&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// app/settings/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LargeTitle&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;News&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Center&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Settings route&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now be able to navigate between tabs 🎉&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Adding UI to the "News" Route
&lt;/h3&gt;

&lt;p&gt;Let's add some UI to our &lt;code&gt;news&lt;/code&gt; route. Don't worry if you are not using &lt;a href="https://bit.ly/3tGv8sy" rel="noopener noreferrer"&gt;SpiroKit&lt;/a&gt;. The key takeaway here is that we'll use the &lt;code&gt;useLink&lt;/code&gt; hook from Expo Router to navigate to the news details route.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/news/index.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VerticalCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Badge&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;HorizontalCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Pressable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useLink&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;BellIcon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LightBulbIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;News&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useLink&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;
      &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryDark.1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;safeArea&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ScrollView&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt; &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;
            &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"space-between"&lt;/span&gt;
            &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;News&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt; &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;BellIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sm"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"auto"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              Subscribe
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* We are using the push method to navigate to news details */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Pressable&lt;/span&gt; &lt;span class="na"&gt;onPress&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/news/1234&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MainTravelCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;MainTravelCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Pressable&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SecondaryTravelCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SecondaryTravelCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;FoodCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;FoodCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;ScrollView&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MainTravelCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VerticalCard&lt;/span&gt;
      &lt;span class="na"&gt;BadgeComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Badge&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Travel&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Badge&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;UserAvatarComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Siv Marko profile image"&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/pfR8Ytj.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Siv Marko"&lt;/span&gt;
      &lt;span class="na"&gt;TitleComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Resting place of Australia's last convict ship&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;DescriptionComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          Wellington, New Zealand (CNN) - The storm that struck the Edwin Fox on
          February 1873 might sound dramatic.
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;DateComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;15th June 2021&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;AssetComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/1lSpdz3.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Image of a ship"&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VerticalCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SecondaryTravelCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HorizontalCard&lt;/span&gt;
      &lt;span class="na"&gt;UserAvatarComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Kenny Grimes profile image"&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/mwax0m0.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Kenny Grimes"&lt;/span&gt;
      &lt;span class="na"&gt;TitleComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          Emirates introduces digital health verification for UAE passengers
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;DescriptionComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          Emirates and the Dubai Health Authority (DHA) have begun to implement
          full digital verification of Covid-19 medical records
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;DateComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;15th June 2021&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;AssetLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/EflHxyi.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Image of a ship"&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HorizontalCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;FoodCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HorizontalCard&lt;/span&gt;
      &lt;span class="na"&gt;UserAvatarComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Paula Green profile image"&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/Vbzbh6Z.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Paula Green"&lt;/span&gt;
      &lt;span class="na"&gt;TitleComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          The Best Marinara Sauce You Can Get At The Store
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;TitleThree&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;DateComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;15th June 2021&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Footnote&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;AssetRightComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LightBulbIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HorizontalCard&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F77ee7fw6no3f4tbc1rf5.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.amazonaws.com%2Fuploads%2Farticles%2F77ee7fw6no3f4tbc1rf5.png" alt="News home screen finished" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Adding UI to the "Settings" Route (Optional)
&lt;/h3&gt;

&lt;p&gt;I wanted to use the &lt;code&gt;settings&lt;/code&gt; route to test if I could support switching between light and dark modes with Expo Router.&lt;/p&gt;

&lt;p&gt;Following the Expo Router docs, I learned about the  component, which allows us to interact with the NavigationContainer (managed by Expo Router) to set things like "theme".&lt;/p&gt;

&lt;p&gt;Let's customize the UI to add a switch that allows us to toggle dark mode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/settings/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Switch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;useColorMode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RootContainer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DarkTheme&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LightTheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@react-navigation/native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;LogoutIcon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;UserIcon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LinkIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Settings&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;toggleColorMode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;colorMode&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useColorMode&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* I'm using the global colorMode prop provided by SpiroKit to dinamically set the theme */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;RootContainer&lt;/span&gt; &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;colorMode&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;light&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;LightTheme&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DarkTheme&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Header */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;
        &lt;span class="na"&gt;safeAreaTop&lt;/span&gt;
        &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex-end&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* I'm using the `useColorModeValue` hook provided by SpiroKit to set different colors for light and dark mode */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primary.500&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primary.300&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;minHeight&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryGray.900&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          Settings
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Body */&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;
        &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryDark.1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt; &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt; &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;space-between&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Dark mode&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Switch&lt;/span&gt; &lt;span class="na"&gt;onValueChange&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;toggleColorMode&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Switch&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;
            &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;UserIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;LabelComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Name&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;defaultValue&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Mauro"&lt;/span&gt;
          &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;
            &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;UserIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;LabelComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Lastname&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;defaultValue&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Garcia"&lt;/span&gt;
          &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;
            &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LinkIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;isDisabled&lt;/span&gt;
            &lt;span class="na"&gt;LabelComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Twitter handle&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;defaultValue&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://www.twitter.com/mauro_codes"&lt;/span&gt;
          &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt; &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;LogoutIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Logout&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything goes well, we should now be able to toggle between light and dark mode&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.amazonaws.com%2Fuploads%2Farticles%2F6cxlafbd0kmiskl2t4vv.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.amazonaws.com%2Fuploads%2Farticles%2F6cxlafbd0kmiskl2t4vv.png" alt="settings route on light and dark mode" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Adding a dynamic route for the news details screen
&lt;/h3&gt;

&lt;p&gt;From the &lt;a href="https://expo.github.io/router/docs/features/dynamic-routes" rel="noopener noreferrer"&gt;Expo docs&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Dynamic routes match any unmatched path at a given segment level. For example, /blog/[id] is a dynamic route. The variable part ([id]) is called a "slug"."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We are going to use this pattern to navigate from the "news" route to the news details ("news"/[id]).&lt;/p&gt;

&lt;p&gt;Remember, Expo Router is based on your file system, so let's start by creating a new file for this dynamic route:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch&lt;/span&gt; ./app/news/[id].js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside our new &lt;code&gt;[id].js&lt;/code&gt; file, let's add some UI and see how we can access the &lt;code&gt;id&lt;/code&gt; param.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Given this is a demo, I'm using hardcoded data. In real life, we would use the id from the URL to request the information using &lt;code&gt;fetch&lt;/code&gt; or &lt;code&gt;axios&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useLink&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;expo-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ScrollView&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;ZStack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@spirokit/core&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ChevronLeftIcon&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native-heroicons/outline&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;NewsDetails&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;route&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Extracting the id param from the route&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;route&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// This should be replaced by real data coming from an external API&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;loremIpsum&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;useColorModeValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryDark.1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Header&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ScrollView&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt; &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;ScrollView&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Header&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useLink&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ZStack&lt;/span&gt; &lt;span class="na"&gt;minHeight&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"hidden"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"full"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;
          &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"full"&lt;/span&gt;
          &lt;span class="na"&gt;resizeMode&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"cover"&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/1lSpdz3.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Image of a ship"&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;
          &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;space-between&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;black:alpha.40&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"full"&lt;/span&gt;
          &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OS&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;web&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;
              &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sm"&lt;/span&gt;
              &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"auto"&lt;/span&gt;
              &lt;span class="na"&gt;alignSelf&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;flex-start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="na"&gt;onPress&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;back&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
              &lt;span class="na"&gt;IconLeftComponent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ChevronLeftIcon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt; &lt;span class="na"&gt;numberOfLines&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            Resting place of Australia's last convict ship
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;LargeTitle&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;VStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;ZStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;AuthorLine&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;AuthorLine&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AuthorLine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;
      &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;justifyContent&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;space-between&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt; &lt;span class="na"&gt;space&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alignItems&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"center"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;
          &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Siv Marko profile image"&lt;/span&gt;
          &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://i.imgur.com/pfR8Ytj.png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Avatar&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Siv Marko&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt; &lt;span class="na"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;textAlign&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"right"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        15th June 2021
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Subhead&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;HStack&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;loremIpsum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus blandit faucibus justo, at eleifend sapien pellentesque ut. Curabitur ultrices eget arcu sit amet luctus. Mauris accumsan ut mauris eget pharetra. Quisque dignissim sed leo sed condimentum. Nullam ligula nisi, pellentesque sit amet lacus eget, malesuada tempus lorem. Pellentesque fringilla erat a faucibus semper. Sed posuere tristique vulputate.

Nam convallis tempor dictum. Donec maximus nisl a tempor condimentum. Fusce egestas velit id ante consectetur feugiat. Nam non ligula metus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce efficitur tellus leo, non vehicula lorem ornare id. Vivamus enim mauris, volutpat ut luctus semper, hendrerit eu dolor. Nunc a sapien ac ex tempus tempor. Cras odio augue, porta vitae venenatis id, sagittis at tortor. Etiam id tristique tortor, in eleifend dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you reload your app, you should now be able to navigate to the news details screen.&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.amazonaws.com%2Fuploads%2Farticles%2F6neefkh02z73ck5gfg4v.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.amazonaws.com%2Fuploads%2Farticles%2F6neefkh02z73ck5gfg4v.png" alt="news details screen finished" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that you didn't have to add any additional configuration to use this last route. Given that we already setup the stack navigator for the "news" directory, every child automatically becomes a valid route ✨✨&lt;/p&gt;

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

&lt;p&gt;Congrats! If you are still here, you managed to build a small app that leverages a few of the available features on Expo Router.&lt;br&gt;
This is just the beginning. We are in the early days of this library, so everything is changing really fast.&lt;br&gt;
If you enjoyed this article, don't hesitate to leave a comment or reach out to me on Twitter. My DM's are always open.&lt;/p&gt;

&lt;p&gt;I would love to hear your thoughts!&lt;br&gt;
Happy coding!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Expo 101: Building mobile apps in weeks, not years</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Thu, 17 Feb 2022 11:11:55 +0000</pubDate>
      <link>https://forem.com/mauro_codes/expo-101-building-mobile-apps-in-weeks-not-years-aj1</link>
      <guid>https://forem.com/mauro_codes/expo-101-building-mobile-apps-in-weeks-not-years-aj1</guid>
      <description>&lt;p&gt;Mobile app development used to be painful. &lt;br&gt;
In this post, I talk about how Expo changed that forever. &lt;/p&gt;

&lt;p&gt;At the end of this post, you'll get a solid understanding of the entire Expo ecosystem, and you'll be able to create your first app, add some features, build it in the cloud, and submit it for review in the stores.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
A little bit of history

&lt;ul&gt;
&lt;li&gt;Working on mobile was a pain&lt;/li&gt;
&lt;li&gt;Code reusability&lt;/li&gt;
&lt;li&gt;Signing and certificates&lt;/li&gt;
&lt;li&gt;iOS development: a luxury for a few&lt;/li&gt;
&lt;li&gt;Slow feedback loop&lt;/li&gt;
&lt;li&gt;Hybrid app development&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
What is Expo?

&lt;ul&gt;
&lt;li&gt;Workflows&lt;/li&gt;
&lt;li&gt;Bare workflow&lt;/li&gt;
&lt;li&gt;Managed workflow&lt;/li&gt;
&lt;li&gt;Expo ecosystem&lt;/li&gt;
&lt;li&gt;Expo CLI&lt;/li&gt;
&lt;li&gt;Expo Dev Tools&lt;/li&gt;
&lt;li&gt;Expo Snack&lt;/li&gt;
&lt;li&gt;Expo Application Services (EAS)&lt;/li&gt;
&lt;li&gt;Over the air updates&lt;/li&gt;
&lt;li&gt;Expo SDK&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
I'm sold! Where should I start?

&lt;ul&gt;
&lt;li&gt;Bootstrapping a new project&lt;/li&gt;
&lt;li&gt;Running your project on a real device&lt;/li&gt;
&lt;li&gt;Making changes in real-time with Expo Go&lt;/li&gt;
&lt;li&gt;Adding new functionality using the Expo SDK&lt;/li&gt;
&lt;li&gt;Building an app with Expo Application Services&lt;/li&gt;
&lt;li&gt;Submitting your app to the store&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Conclusions&lt;/li&gt;
&lt;li&gt;Shameless plug&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  A little bit of history
&lt;/h1&gt;

&lt;p&gt;At the beginning of time, Mobile app development used to be quite complex. &lt;/p&gt;

&lt;p&gt;It required you to learn how to use new tools and programming languages and deal with a whole new range of problems (don't let me start on publishing and signing).&lt;/p&gt;

&lt;p&gt;Documentation was scarce (and I'm being generous), and if you got stuck with an issue, your previous knowledge about web development was not instantly transferable. &lt;/p&gt;

&lt;p&gt;In other words, it was an entirely new world to discover (and tame)&lt;/p&gt;


&lt;h2&gt;
  
  
  Working on mobile was a pain
&lt;/h2&gt;

&lt;p&gt;The development experience used to be awful. Here are the main reasons that come to mind:&lt;/p&gt;
&lt;h3&gt;
  
  
  Code reusability
&lt;/h3&gt;

&lt;p&gt;Before hybrid app development was a thing, you needed to build two entirely different apps to support Android and iOS. &lt;/p&gt;

&lt;p&gt;In other words, zero code reusability, and it was twice as challenging to maintain your app.&lt;/p&gt;
&lt;h3&gt;
  
  
  Signing and certificates
&lt;/h3&gt;

&lt;p&gt;The signing process was tedious and entirely different for each platform.&lt;/p&gt;

&lt;p&gt;If you were unlucky enough to have to deal with certificates in iOS, you would know it is a nightmare. Furthermore, certificates expire, meaning that you had to manually keep an eye on them to prevent issues.&lt;/p&gt;
&lt;h3&gt;
  
  
  iOS development: a luxury for a few
&lt;/h3&gt;

&lt;p&gt;If you wanted to build an iOS app, you needed a mac before starting. &lt;/p&gt;

&lt;p&gt;You could think this is not a big deal, especially if you live in a developed country. However, here in Argentina, the story is quite different. I can tell you I didn't know anyone with a mac in my entire childhood. &lt;/p&gt;

&lt;p&gt;Nowadays, it's way more common to see developers using a mac, but 10 years ago, it wasn't that common. So, iOS development was something restricted for those who could afford it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Slow feedback loop
&lt;/h3&gt;

&lt;p&gt;With modern web development, we have instant feedback of our changes thanks to things like "hot reload": You make a change, and you immediately know if you screw something or if your change introduced a new bug.&lt;/p&gt;

&lt;p&gt;Moreover, web apps are easy to test in different scenarios.&lt;/p&gt;

&lt;p&gt;On native mobile development, you had to recompile the entire app after each change, and if you wanted to test your app on different devices, you had to publish it through the Store (at least in iOS). &lt;/p&gt;

&lt;p&gt;As an alternative, you could use emulators, but it was slow as hell, and sometimes it didn't reflect reality.&lt;/p&gt;


&lt;h2&gt;
  
  
  Hybrid app development
&lt;/h2&gt;

&lt;p&gt;Frameworks like Xamarin, Ionic, Apache Cordova, and PhoneGap appeared in 2011 (Xamarin was the first one). React Native came later in 2015.&lt;/p&gt;

&lt;p&gt;It was a big thing, and those new frameworks helped improve the development experience a lot. Now, you could reuse part of your previous knowledge as a web developer to work on mobile, and, in some cases, you could build an entire app without dealing with native specific code at all.&lt;/p&gt;

&lt;p&gt;Yet, compiling and publishing still was a pain, and you needed a mac for iOS. In addition, documentation was still poor, and performance comparison between a native app and a hybrid app was always discussed.&lt;/p&gt;

&lt;p&gt;As an evolution for hybrid frameworks, Expo appeared a few years ago.&lt;/p&gt;


&lt;h1&gt;
  
  
  What is Expo?
&lt;/h1&gt;

&lt;p&gt;Expo is a Framework that allows you to build a React Native project that runs natively on any platform or device.&lt;/p&gt;

&lt;p&gt;What is fantastic about Expo is that it allows you to instantly run your app using Expo Go, an app you can install on your Android or iOS device. &lt;/p&gt;

&lt;p&gt;In other words, you don't need to have a mac or to install anything on your PC besides Node. In fact, my primary workstation is running Linux, and I've been working with Expo for years without problems.&lt;/p&gt;

&lt;p&gt;You have instant feedback thanks to Expo Go, which includes hot reload and keeps track of your current screen state.&lt;/p&gt;

&lt;p&gt;Expo is also an ecosystem that includes a set of tools and services that drastically improves your development experience by taking care of annoying things like building, signing, and publishing your apps.&lt;/p&gt;


&lt;h2&gt;
  
  
  Workflows
&lt;/h2&gt;

&lt;p&gt;When building an app with Expo, you can use two different workflows. Both provide a very different experience and cover two totally different requirements.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FYML6jEw.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%2Fi.imgur.com%2FYML6jEw.png" alt="A brief summary of the key differences between the managed workflow and the bare workflow"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Bare workflow
&lt;/h3&gt;

&lt;p&gt;This workflow is only recommended when you need absolute control over the native code of your app.&lt;/p&gt;

&lt;p&gt;I can only recommend using it if you know you'll need to work with native packages not included in the Expo SDK or have a config plugin to work with Expo.&lt;/p&gt;

&lt;p&gt;Keep in mind that, by using this workflow, you will need to handle all the complexity associated with the native code for each platform.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Managed workflow
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You build your app only using JavaScript or Typescript.&lt;/li&gt;
&lt;li&gt;You don't have to deal with native code at all.&lt;/li&gt;
&lt;li&gt;Expo handles building, signing, and publishing using different tools and services like Expo CLI or Expo Application Services (EAS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This mode has its own limitations: Only packages included in the Expo SDK or native packages that include a config plugin will work with this workflow. &lt;/p&gt;

&lt;p&gt;This could sound like a huge roadblock, but most packages work with this workflow nowadays. &lt;/p&gt;

&lt;p&gt;Furthermore, Expo has been working on new features like &lt;a href="https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8" rel="noopener noreferrer"&gt;custom development clients&lt;/a&gt; and &lt;a href="https://docs.expo.dev/guides/config-plugins/" rel="noopener noreferrer"&gt;config plugins&lt;/a&gt; to allow developers to adapt more and more libraries so you can use them with Expo.&lt;/p&gt;

&lt;p&gt;If you are starting to work on a new project today, I highly recommend using the managed workflow. The Expo team is using all their energy to improve this workflow every day, and I've been using it for almost two years now, and I didn't find any significant limitations yet.&lt;/p&gt;


&lt;h2&gt;
  
  
  Expo ecosystem
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Expo CLI
&lt;/h3&gt;

&lt;p&gt;The Expo CLI is the interface between you (the developer) and the Expo ecosystem. You can use it for many different things, but if I had to mention the most important ones, I would say:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap new projects&lt;/li&gt;
&lt;li&gt;Run your expo project using Expo Go or Emulators.&lt;/li&gt;
&lt;li&gt;Install new packages from the expo SDK (More about this below)&lt;/li&gt;
&lt;li&gt;Upgrade your project SDK version.&lt;/li&gt;
&lt;li&gt;Build and sign your app (Only managed workflow). This service is known as the classic build service.&lt;/li&gt;
&lt;li&gt;Send Over-the-air updates (More about this below)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to install the Expo CLI tool, just run the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; expo-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Expo Dev Tools
&lt;/h3&gt;

&lt;p&gt;Expo Dev Tools is a web browser-based control panel included in Expo CLI. With Expo Dev tools, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;View logs from supporting services (Metro and Webpack bundlers)&lt;/li&gt;
&lt;li&gt;View logs from your device&lt;/li&gt;
&lt;li&gt;Scan a QR Code from Expo Go to quickly launch your app.&lt;/li&gt;
&lt;li&gt;Debug connectivity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This control panel will be opened every time you run the &lt;code&gt;expo start&lt;/code&gt; command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expo Snack
&lt;/h3&gt;

&lt;p&gt;Expo Snack is an open-source platform for running React Native apps in the browser.&lt;br&gt;
It handles compilation and bundling for you and allows you to run your app with Expo Go or in a web simulator.&lt;br&gt;
You can easily save a piece of code as a "Snack" and share it with others.&lt;/p&gt;

&lt;p&gt;Here's &lt;a href="https://snack.expo.dev/@maurogarcia0209/ed6411" rel="noopener noreferrer"&gt;an example of a Snack&lt;/a&gt; a created for this post&lt;/p&gt;
&lt;h3&gt;
  
  
  Expo Application Services (EAS)
&lt;/h3&gt;

&lt;p&gt;Expo Application Services (EAS) is a set of cloud services that allows you to quickly build, sign and publish your app in the stores. &lt;/p&gt;

&lt;p&gt;I can't recommend it enough! Since day one, I've been using this service when it was in beta, and it has saved me hundreds of hours of pain.&lt;/p&gt;

&lt;p&gt;It's divided into three different features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EAS Build&lt;/strong&gt;: Compile and sign Android/iOS apps with custom native code in the cloud. &lt;a href="https://docs.expo.dev/build/introduction/" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EAS Submit&lt;/strong&gt;: Upload your app to the Apple App Store or Google Play Store from the cloud with one CLI command. &lt;a href="https://docs.expo.dev/submit/introduction/" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EAS Update&lt;/strong&gt; (preview): Address small bugs and push quick fixes directly to end-users without dealing with the tedious process of submitting your app for review. &lt;a href="https://docs.expo.dev/eas-update/introduction/" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Over the air updates
&lt;/h3&gt;

&lt;p&gt;Over-the-air updates allow your app to receive updates without submitting and waiting for ages until Apple and Google review each change you made. These updates include your app's JavaScript and assets.&lt;/p&gt;

&lt;p&gt;This feature has a few limitations: If you need to add new native packages or update your SDK version, you will need to rebuild and submit.&lt;/p&gt;

&lt;p&gt;But for the daily patches and hotfixes, it will save you tons of hours, and more importantly, allow you to instantly respond to bugs in production.&lt;/p&gt;
&lt;h3&gt;
  
  
  Expo SDK
&lt;/h3&gt;

&lt;p&gt;The Expo SDK works like an extension of the React Native core package, and when I say extension, I'm not talking about only a few additional features. &lt;/p&gt;

&lt;p&gt;At the moment of this writing, the Expo SDK includes at least 100 packages. I would like to share a few examples of packages I use every day and save me tons of hours of work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/latest/sdk/firebase-analytics/" rel="noopener noreferrer"&gt;expo-firebase-analytics&lt;/a&gt;: Enables the use of native Google Analytics for Firebase.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/latest/sdk/filesystem/" rel="noopener noreferrer"&gt;expo-file-system&lt;/a&gt;:  Provides access to a file system stored locally on the device. It also allows you to download and upload files from network URLs.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/latest/sdk/document-picker/" rel="noopener noreferrer"&gt;expo-document-picker&lt;/a&gt; and &lt;a href="https://docs.expo.dev/versions/latest/sdk/imagepicker/" rel="noopener noreferrer"&gt;expo-image-picker&lt;/a&gt;: Provide access to the system's UI for selecting images, videos and documents.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/latest/sdk/localization/" rel="noopener noreferrer"&gt;expo-localization&lt;/a&gt;: Allows you to localize your app, customizing the experience for specific regions or languages.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/guides/linking/" rel="noopener noreferrer"&gt;expo-linking&lt;/a&gt;: Easily setup deep linking both with a custom scheme or using HTTPS.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/latest/sdk/device/" rel="noopener noreferrer"&gt;expo-device&lt;/a&gt;: Provides access to system information about the physical device, such as its manufacturer and model.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.expo.dev/versions/v44.0.0/sdk/font/" rel="noopener noreferrer"&gt;expo-font&lt;/a&gt;: Allows loading fonts from the web and using them in React Native components. See more detailed usage information in the &lt;a href="https://docs.expo.dev/guides/using-custom-fonts/" rel="noopener noreferrer"&gt;Fonts&lt;/a&gt; guide.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  I'm sold! Where should I start?
&lt;/h1&gt;

&lt;p&gt;I already mentioned a lot of different tools and services, and it could be a little bit daunting at first. &lt;/p&gt;

&lt;p&gt;I'll show you how to combine all these tools in a project.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FY2uf9Qj.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%2Fi.imgur.com%2FY2uf9Qj.png" alt="The Expo ecosystem in action. 6 steps from bootstrapping your project to submitting your app for review"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Bootstrapping a new project
&lt;/h2&gt;

&lt;p&gt;Let's start by installing the Expo CLI globally on your machine by running the following command on your terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; expo-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we can create a new Expo project like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;expo init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You can use the optional flag --yarn if you prefer yarn over npm&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Expo CLI will ask you your project's name, which template you want to use, and a few more preferences.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Running your project on a real device
&lt;/h2&gt;

&lt;p&gt;After the &lt;code&gt;expo init&lt;/code&gt; finished, cd into your new project and run the &lt;code&gt;npm start&lt;/code&gt; command. This will run &lt;code&gt;expo start&lt;/code&gt; behind the scenes.&lt;/p&gt;

&lt;p&gt;This will start a local server for your app, opening your web browser with the control panel.&lt;/p&gt;

&lt;p&gt;Go to your Android or iOS device, and &lt;strong&gt;install Expo Go from the store&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Open Expo Go on your phone, and &lt;strong&gt;scan the QR code&lt;/strong&gt; available in the web control panel.&lt;/p&gt;

&lt;p&gt;Wait until your phone finishes downloading all the js files, and that's it! Your first app is already running on your phone.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Making changes in real-time with Expo Go
&lt;/h2&gt;

&lt;p&gt;With your app still running on your phone, go to your &lt;code&gt;App.js&lt;/code&gt; or &lt;code&gt;App.tsx&lt;/code&gt; file and make a small change like this one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View } from "react-native";
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;export default function App() {
&lt;/span&gt;  return (
    &amp;lt;View style={styles.container}&amp;gt;
      &amp;lt;Text&amp;gt;Open up App.tsx to start working on your app!&amp;lt;/Text&amp;gt;
&lt;span class="gi"&gt;+     &amp;lt;Text style={{ backgroundColor: "red", color: "white" }}&amp;gt;
+       This is a custom text with red background!
+     &amp;lt;/Text&amp;gt;
&lt;/span&gt;      &amp;lt;StatusBar style="auto" /&amp;gt;
    &amp;lt;/View&amp;gt;
  );
}
&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;const styles = StyleSheet.create({
&lt;/span&gt;  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not hit save, and take a look at your phone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/V0IdVIIW1y5d6/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/V0IdVIIW1y5d6/giphy.gif" alt="mind blown meme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your changes are instantly available on your phone. Magic.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Adding new functionality using the Expo SDK
&lt;/h2&gt;

&lt;p&gt;Let's say we want to grab a few details about the user device and show this data on a screen.&lt;/p&gt;

&lt;p&gt;We will leverage the Expo SDK for that, and more specifically, we'll use the &lt;a href="https://docs.expo.dev/versions/latest/sdk/device/" rel="noopener noreferrer"&gt;expo-device&lt;/a&gt; package mentioned above.&lt;/p&gt;

&lt;p&gt;Using the Expo CLI again, run the following command on your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;expo &lt;span class="nb"&gt;install &lt;/span&gt;expo-device
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, go to your &lt;code&gt;App.js&lt;/code&gt; or &lt;code&gt;App.tsx&lt;/code&gt; file and add the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="p"&gt;import { StatusBar } from "expo-status-bar";
import { StyleSheet, Text, View } from "react-native";
&lt;/span&gt;&lt;span class="gi"&gt;+ import * as Device from "expo-device";
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;export default function App() {
&lt;/span&gt;  return (
    &amp;lt;View style={styles.container}&amp;gt;
&lt;span class="gd"&gt;-     &amp;lt;Text&amp;gt;Open up App.tsx to start working on your app!&amp;lt;/Text&amp;gt;
&lt;/span&gt;&lt;span class="gi"&gt;+     &amp;lt;Text&amp;gt;Brand: {Device.brand}&amp;lt;/Text&amp;gt;
+     &amp;lt;Text&amp;gt;Manufacturer: {Device.manufacturer}&amp;lt;/Text&amp;gt;
+     &amp;lt;Text&amp;gt;Model name: {Device.modelName}&amp;lt;/Text&amp;gt;
&lt;/span&gt;      &amp;lt;StatusBar style="auto" /&amp;gt;
    &amp;lt;/View&amp;gt;
  );
}
&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="p"&gt;const styles = StyleSheet.create({
&lt;/span&gt;  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything went as expected, you should see something like this on your phone:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fx2smkZj.jpg" 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%2Fi.imgur.com%2Fx2smkZj.jpg" alt="Minimal example of expo-device package working on an iOS device"&gt;&lt;/a&gt;&lt;br&gt;
Congrats! You integrated your first package from the Expo SDK into your project.&lt;/p&gt;

&lt;p&gt;As I mentioned above, there are 100+ packages available in the Expo SDK, which means you can unlock unlimited potential for your next project in minutes.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an app with Expo Application Services
&lt;/h2&gt;

&lt;p&gt;Our handy app that shows information about your device is ready. &lt;br&gt;
The next step is to generate a build and try our app without Expo Go.&lt;/p&gt;

&lt;p&gt;We are going to leverage Expo Application Services for that.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To use EAS, you will need to install the &lt;code&gt;eas-cli&lt;/code&gt; package globally. Go to your terminal and run the following command.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; eas-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Visit &lt;a href="https://expo.dev" rel="noopener noreferrer"&gt;https://expo.dev&lt;/a&gt; and Sign up to start using EAS. The free plan already includes everything you need if you are an indie hacker working on your own apps.&lt;/li&gt;
&lt;li&gt;Once you have created your account, go to the terminal and login using the &lt;code&gt;eas login&lt;/code&gt; command.&lt;/li&gt;
&lt;li&gt;Still in the terminal, navigate to your project's directory and run the &lt;code&gt;eas build:configure&lt;/code&gt; command to configure your project to run on EAS build. Please follow &lt;a href="https://docs.expo.dev/build-reference/build-configuration/" rel="noopener noreferrer"&gt;this link&lt;/a&gt; if you want to learn more about this. After finishing this configuration. You will get a new &lt;code&gt;eas.json&lt;/code&gt; file in the root directory of your current project.&lt;/li&gt;
&lt;li&gt;Go to your &lt;code&gt;app.json&lt;/code&gt; file and configure your &lt;code&gt;android.package&lt;/code&gt; and &lt;code&gt;ios.bundleIdentifier&lt;/code&gt; props. EAS will prompt you to specify them.&lt;/li&gt;
&lt;li&gt;If you are using iOS, you will need to register your iPhone device first. This will only take you a minute. Run the &lt;code&gt;eas device:create&lt;/code&gt; command and follow the instructions. You will get a link to open on your phone and install a required certificate.&lt;/li&gt;
&lt;li&gt;Run the &lt;code&gt;eas build --profile development --platform android&lt;/code&gt; or &lt;code&gt;eas build --profile development --platform ios&lt;/code&gt; to generate your first build in the cloud. Expo will handle all the heavy lifting for you by creating the required certificates, signing your app for you, and starting building your app in the cloud. You'll get a link where you can follow the progress of your build.&lt;/li&gt;
&lt;li&gt;After finishing building, you can download the apk (if you targeted Android) or copy the link to install your app on iOS.

## Submitting your app to the store
After building and testing your app to check that everything is working as expected, we are ready to submit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Again, EAS will handle this for you. Just run the &lt;code&gt;eas submit --platform [Your platform]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;EAS will use your latest build for the submission by default, but you can manually specify a previous build if you want. To learn more about the available options, run the &lt;code&gt;eas submit --help&lt;/code&gt; command. &lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;Congrats! If everything went as expected, your app was already submitted 🥳️ .&lt;br&gt;
What I love about the Expo ecosystem is that you get a tool for each stage of your project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do you need to create a new project or add Expo to an existing React Native app? You can use Expo-CLI for that.&lt;/li&gt;
&lt;li&gt;Do you need to add new features to your app? You have 100+ packages already included in the Expo SDK.&lt;/li&gt;
&lt;li&gt;Do you need to build and sign your app? Use EAS Build&lt;/li&gt;
&lt;li&gt;Ready to submit? EAS Submit got your back.&lt;/li&gt;
&lt;li&gt;Do you need to quickly fix an error in production? EAS Update allows you to push your js changes without submitting your app again.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Shameless plug
&lt;/h1&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%2Fi.imgur.com%2FOtt9Jm6.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%2Fi.imgur.com%2FOtt9Jm6.png" alt="SpiroKit design system"&gt;&lt;/a&gt;&lt;br&gt;
Last year I released my own design system. It's called &lt;a href="https://spirokit.com" rel="noopener noreferrer"&gt;SpiroKit&lt;/a&gt;&lt;br&gt;
If you need a UI kit to prototype your next app, you can use SpiroKit's Figma template.&lt;/p&gt;

&lt;p&gt;I'm currently building the React Native UI library for SpiroKit, so If you want to learn more about it, &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;follow me on Twitter&lt;/a&gt;, when I'm building everything in public, sharing weekly updates about the project.&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>expo</category>
      <category>mobile</category>
      <category>development</category>
    </item>
    <item>
      <title>Adding Storybook to your Expo project</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Thu, 07 Oct 2021 18:31:59 +0000</pubDate>
      <link>https://forem.com/mauro_codes/adding-storybook-to-your-expo-project-4nh4</link>
      <guid>https://forem.com/mauro_codes/adding-storybook-to-your-expo-project-4nh4</guid>
      <description>&lt;p&gt;Imagine having a web portal to showcase, document, test, and improve all your React Native components. A place where you can build your own library over time and then use that library to quickly build and release all those app ideas you have.&lt;/p&gt;

&lt;p&gt;If that sounds appealing to you, you'll love &lt;a href="https://storybook.js.org" rel="noopener noreferrer"&gt;Storybook&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post, I'll talk about what Storybook is, how it can help you, and how to add it to your Expo project.&lt;/p&gt;






&lt;h1&gt;
  
  
  What is Storybook, and how can it help you?
&lt;/h1&gt;

&lt;p&gt;Storybook is an open-source tool for building UI components and pages in isolation. In other words, it's a library you can add to your project to test and document your components.&lt;/p&gt;

&lt;p&gt;Are you still confused? No worries. I had to read the official documentation and search for real-life examples before genuinely understanding how powerful this tool is. So, follow me with this basic example.&lt;/p&gt;

&lt;p&gt;Let's say we have a simple component called "Hero." It receives the following props:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Title&lt;/li&gt;
&lt;li&gt;ButtonText&lt;/li&gt;
&lt;li&gt;OnButtonPress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code for that component will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;HeroProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;
    &lt;span class="na"&gt;buttonText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;
    &lt;span class="na"&gt;onButtonPress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FC&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HeroProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;buttonText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;onButtonPress&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;props&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt; &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;buttonText&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;onPress&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;onButtonPress&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;View&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;styles&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;StyleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;marginBottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;textAlign&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;center&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;I'm using TypeScript for all the code examples on this article, but you can use Storybook with plain js too.&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;If we want to reference this component on your React Native app, we will use it like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;Hero&lt;/span&gt;
    &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Welcome to my App"&lt;/span&gt;
    &lt;span class="na"&gt;buttonText=&lt;/span&gt;&lt;span class="s"&gt;"Sign in"&lt;/span&gt;
    &lt;span class="na"&gt;onButtonPress=&lt;/span&gt;&lt;span class="s"&gt;{()&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Alert.alert("Signed in")}&amp;gt;
&lt;span class="nt"&gt;&amp;lt;/Hero&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;p&gt;And f we run the app, we should see something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVOUzx6e.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%2Fi.imgur.com%2FVOUzx6e.png" alt="Hero component showing a title and a clickable blue button"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;If you are working for a company, chances are that you'll have to communicate how your new component works to the rest of the team.&lt;/p&gt;

&lt;p&gt;Besides, your teammates must know that your Hero component exists to avoid code duplication.&lt;/p&gt;

&lt;p&gt;Last but not least, you will need to test your component with different props combinations to make sure everything works as expected. For example, what happens if we use a really long text for our button? Is our component responsive?&lt;/p&gt;



&lt;p&gt;Storybook is the solution for all the problems I mentioned before. It help's you build a centralized component library with rich and interactive documentation so your teammates can reuse it or even improve it.&lt;/p&gt;

&lt;p&gt;Here's an example of how a storybook portal will look like with our Hero component:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FonwboRn.gif" 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%2Fi.imgur.com%2FonwboRn.gif" alt="Storybook web portal in action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, you can change the value of any prop in real-time, read the autogenerated documentation (which can be manually improved), and copy an example of the code required to use the component.&lt;/p&gt;

&lt;p&gt;Storybook also lets you create "Stories," which represent different states for the same component.&lt;/p&gt;

&lt;p&gt;If we now add a new prop to our component called "hideButton," we should create a new story to see how the component looks like with and without the button:&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%2Fi.imgur.com%2FX48p58o.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%2Fi.imgur.com%2FX48p58o.png" alt="Storybook web interface showing different stories for the same component. In this case, it shows a Hero component with two stories: With icon and without icon"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Setup options
&lt;/h1&gt;

&lt;p&gt;There are three main ways to use Storybook with Expo. Based on what you choose, the installation process will be different.&lt;/p&gt;


&lt;h2&gt;
  
  
  Storybook 100% Web
&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%2Fi.imgur.com%2FyfpK55n.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%2Fi.imgur.com%2FyfpK55n.png" alt="graphic that represents the first setup: Storybook 100% web"&gt;&lt;/a&gt;&lt;br&gt;
This is my favorite setup. You work on your React Native components as usual and reference those components as Stories that can be rendered directly into the browser.&lt;/p&gt;
&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You can publish your Storybook web portal and share it with your teammates. Everyone can access the documentation and play with the components without having to install anything.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Any native component like a Date time picker won't be rendered. For those components, you will need to use the other methods described below.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Storybook Hybrid
&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%2Fi.imgur.com%2F3sGNpWJ.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%2Fi.imgur.com%2F3sGNpWJ.png" alt="graphic that represents the second setup: Storybook Hybrid"&gt;&lt;/a&gt;&lt;br&gt;
With this setup, you still get a web portal, but it uses web sockets to connect to a native device. The documentation for the components still is presented on the web, but the rendering of the components will require an actual device connected.&lt;/p&gt;
&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You don't have any limitations to render native components like Date Time Picker because everything runs on your phone.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The documentation is not easy to share or consume by the rest of the team. Because the web portal is searching for a device to connect with, you won't see the documentation until everything is wired up with a device.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Storybook 100% native
&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%2Fi.imgur.com%2FTWKj3oq.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%2Fi.imgur.com%2FTWKj3oq.png" alt="graphic that represents the third setup: Storybook 100% native"&gt;&lt;/a&gt;&lt;br&gt;
With this setup, you replace the entry point of your React Native app with the Storybook UI. Everything is presented directly within your phone.&lt;/p&gt;
&lt;h3&gt;
  
  
  Pros
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Same as the hybrid approach.&lt;/li&gt;
&lt;li&gt;It could be helpful if you want to make an app to showcase your component library.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Cons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reading documentation directly from your phone is not the best option if you want to promote collaboration within your team. Having a web interface is always better for developers who will spend hours a day working with a design system.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;I'll focus this guide on the first setup, but please send a DM through my &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; if you want me to cover the other available options.&lt;/p&gt;

&lt;p&gt;To use Storybook, we'll need an existing Expo project. If you already have a project, you can skip the first step.&lt;/p&gt;


&lt;h2&gt;
  
  
  1. Creating a new expo project
&lt;/h2&gt;

&lt;p&gt;Create a new Expo project, choose a template and a name for your project&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You'll need to install the Expo CLI globally: npm i -g expo-cli: &lt;code&gt;npm i -g expo-cli&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Adding Storybook
&lt;/h2&gt;

&lt;p&gt;Navigate to your new project root directory and run the following command to add Storybook&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx -p @storybook/cli sb init --type react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the installation is complete, you'll see two new directories on your project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.storybook&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Here is where your storybook configuration files will live. You can customize the Storybook UI using a custom theme or by adding plugins.
&amp;gt; I'll cover all the customization options in another post.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;stories&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Here is where you'll add all the stories you need to test each component. This is the best place to mock dependencies or add any required Provider. Besides, you can augment the component documentation and add custom pages if needed.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Adding your first stories
&lt;/h2&gt;

&lt;p&gt;The basic installation already includes a few stories that serve as an example. However, if you want to learn more about stories, here is the &lt;a href="https://storybook.js.org/docs/react/writing-stories/introduction" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let's add two stories for our "Hero" component. The button will only be visible in the first story. &lt;/p&gt;

&lt;p&gt;Add a new file called &lt;code&gt;Hero.stories.tsx&lt;/code&gt; or &lt;code&gt;Hero.stories.jsx&lt;/code&gt; with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ComponentStory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ComponentMeta&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@storybook/react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../src/components/Hero&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Alert&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-native&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Example/Hero&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;ComponentMeta&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Template&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ComponentStory&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;Hero&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Hero&lt;/span&gt; &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;WithButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Template&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;

&lt;span class="nx"&gt;WithButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storyName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;With button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WithButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome to my App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;buttonText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sign in&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;hideButton&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;onButtonPress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Alert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Signed in&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;WithoutButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Template&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt;

&lt;span class="nx"&gt;WithoutButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;storyName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Without button&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;WithoutButton&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Welcome to my App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;buttonText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sign in&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;hideButton&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;onButtonPress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Alert&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Signed in&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, run the &lt;code&gt;yarn storybook&lt;/code&gt;, or &lt;code&gt;npm run storybook&lt;/code&gt; command to start your Storybook server and test your stories. If you want to customize your existing stories or add new ones, Storybook comes with hot reload by default, so you'll instantly see any change after saving.&lt;/p&gt;

&lt;p&gt;In upcoming posts, I will talk more about Storybook UI customization and how you can improve your stories and docs.&lt;/p&gt;

&lt;p&gt;If you don't want to miss these series, follow me on &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;Twitter&lt;/a&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%2Fi.imgur.com%2FOtt9Jm6.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%2Fi.imgur.com%2FOtt9Jm6.png" alt="SpiroKit banner"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, I'm currently working on a Design System called &lt;a href="https://spirokit.com" rel="noopener noreferrer"&gt;SpiroKit&lt;/a&gt;. You can pre-purchase the Figma file + the React Native library with a 50% discount using the code "HUNT" for a limited time.&lt;/p&gt;

</description>
      <category>expo</category>
      <category>javascript</category>
      <category>reactnative</category>
      <category>storybook</category>
    </item>
    <item>
      <title>Presenting TypeIt: A VSCode extension for content creators</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Mon, 12 Apr 2021 16:43:41 +0000</pubDate>
      <link>https://forem.com/mauro_codes/presenting-typeit-a-vscode-extension-for-content-creators-60d</link>
      <guid>https://forem.com/mauro_codes/presenting-typeit-a-vscode-extension-for-content-creators-60d</guid>
      <description>&lt;p&gt;Today I wanted to share with you a side-project I've been working on with &lt;a class="mentioned-user" href="https://dev.to/paulasantamaria"&gt;@paulasantamaria&lt;/a&gt;
. &lt;/p&gt;

&lt;p&gt;It's called &lt;strong&gt;TypeIt: Typing animations for content creators&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;TypeIt is a VSCode extension that retypes your code so you can record it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why TypeIt?
&lt;/h1&gt;

&lt;p&gt;Sometimes we just want to write code at our own pace, test it, and, once we are comfortable, share it online as code snippets or tutorials. We may not want to memorize and write the code all over again just to record it. That's when TypeIt comes in. Use it to automatically retype the code you want to share.&lt;/p&gt;

&lt;p&gt;Plus, you can choose different modes, adjust the typing speed and even retype multiple documents in parallel!&lt;/p&gt;

&lt;p&gt;This video demonstrates how TypeIt can be used to create and share content:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1_GBQnNuZ5Q"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  More info
&lt;/h1&gt;

&lt;p&gt;If you want to learn more about it, you can visit our &lt;a href="https://typeit.uppernauts.com/"&gt;website&lt;/a&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  We would love to hear your thoughts 💬
&lt;/h1&gt;

&lt;p&gt;What do you think about TypeIt?&lt;br&gt;
Would you try it?&lt;br&gt;
Let us know if you have any questions or feedback in the comments below👇&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>vscode</category>
      <category>plugins</category>
      <category>tools</category>
    </item>
    <item>
      <title>Building a React Native app from scratch: Project overview</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Thu, 18 Mar 2021 19:32:11 +0000</pubDate>
      <link>https://forem.com/mauro_codes/project-overview-gl5</link>
      <guid>https://forem.com/mauro_codes/project-overview-gl5</guid>
      <description>&lt;p&gt;Do you want to learn what it takes to build a real app with React Native?⁣⁣⁣&lt;br&gt;
⁣&lt;br&gt;
Following my “Building a React Native app from scratch.”, I wanted to show you an overview of the whole project and tell you the story behind it.⁣&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%2Fi.imgur.com%2FI7KUeVy.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%2Fi.imgur.com%2FI7KUeVy.png" alt="Formal Barber booking app - Home page"&gt;&lt;/a&gt;&lt;br&gt;
⁣&lt;/p&gt;
&lt;h1&gt;
  
  
  Storytime
&lt;/h1&gt;

&lt;p&gt;Back in 2015, I had never been to a barbershop before in my entire life. After doing some research, I found a well-rated barbershop near my office in Buenos Aires, Argentina. I booked my appointment through an app that let me choose the barber. I randomly picked one, and that’s how I met &lt;a href="https://www.instagram.com/pepshc/" rel="noopener noreferrer"&gt;@pepshc&lt;/a&gt;.⁣&lt;br&gt;
⁣&lt;br&gt;
Fast-forward to today, Andres (a.k.a “Pepe”) has not only been my barber for the last six years, but he has also become a great friend with a lot of projects in common.⁣&lt;br&gt;
⁣&lt;br&gt;
In 2020, Pepe decided to open his own Barbershop in Buenos Aires, and he called it “Formal.” and he recently asked me to help him build an app so their clients could book an appointment with him.⁣&lt;br&gt;
⁣&lt;/p&gt;
&lt;h1&gt;
  
  
  Project Overview
&lt;/h1&gt;

&lt;p&gt;I wanted to keep the app simple so that it could be released as soon as possible. That’s why I thought about the main problem I wanted to solve: Clients should be able to book new appointments with a few taps. They should also be able to cancel an appointment in case of not being able to attend.⁣&lt;/p&gt;


&lt;h2&gt;
  
  
  Sign in &amp;amp; Sign up
&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%2Fi.imgur.com%2FJPbD0we.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%2Fi.imgur.com%2FJPbD0we.png" alt="Formal Barber booking app - Sign in and Sign up screens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These screens will allow the users to sign in / sign up using email and password or using Facebook.&lt;/p&gt;

&lt;p&gt;I'll have to set up Facebook authentication and test a few edge cases.⁣&lt;/p&gt;


&lt;h2&gt;
  
  
  Home⁣ &amp;amp; Forgot Password
&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%2Fi.imgur.com%2FQ6lqBqy.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%2Fi.imgur.com%2FQ6lqBqy.png" alt="Formal Barber booking app - Home and Forgot Password screens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My goal for this screen is to guide the user’s finger to the “New appointment” button. That’s why I decided to locate it at the bottom of the screen, where anyone can easily tap it.&lt;/p&gt;

&lt;p&gt;Besides, users will have all the required information for their next appointment without navigating through different screens.&lt;/p&gt;

&lt;p&gt;I’m still unsure if that card will disappear or show a message where the user doesn’t have any scheduled appointment. &lt;/p&gt;

&lt;p&gt;Users will be able to reset their password using the “Forgot Password” and the “Reset Password” screens. &lt;br&gt;
I'll have to deal with deep linking to redirect the user to the “Reset Password” screen once they tap the email’s link.⁣⁣&lt;/p&gt;


&lt;h2&gt;
  
  
  New appointment flow
&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%2Fi.imgur.com%2Ftt9DBTH.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%2Fi.imgur.com%2Ftt9DBTH.png" alt="Formal Barber booking app - New appointment flow including three screens: Pick a service, Pick a date, and confirm your reservation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to allow users to request a new appointment in six simple steps taps:⁣&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tap the “New appointment button” on the Home screen.⁣&lt;/li&gt;
&lt;li&gt;Pick a service⁣.&lt;/li&gt;
&lt;li&gt;Open the calendar⁣.&lt;/li&gt;
&lt;li&gt;Pick a date⁣.&lt;/li&gt;
&lt;li&gt;Pick an hour⁣.&lt;/li&gt;
&lt;li&gt;Confirm reservation⁣.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To avoid unnecessary steps, I decided not to include any “Continue” button. The app will automatically navigate every time the user picks a service or hour.⁣&lt;/p&gt;


&lt;h2&gt;
  
  
  Appointment list⁣ &amp;amp; My account
&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%2Fi.imgur.com%2FQGx01Gr.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%2Fi.imgur.com%2FQGx01Gr.png" alt="Formal Barber booking app - Appointment list and My Account screens"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The user will only visit this screen for two reasons: ⁣&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To cancel an upcoming appointment⁣&lt;/li&gt;
&lt;li&gt;To check when was the last time they got their haircut.⁣&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s why I decided to include a text at the top of the screen indicating how many days have passed since their last appointment, and I located the upcoming.⁣&lt;/p&gt;

&lt;p&gt;Besides, I located the upcoming appointment at the bottom, so they could easily cancel the appointment.⁣&lt;/p&gt;

&lt;p&gt;Users will be able to change their personal information (like phone number, name, and birthday) and logout. For now, they won’t be able to change their emails to reduce the complexity of the app.⁣&lt;/p&gt;

&lt;p&gt;In the next post, I’ll talk about the navigation and how I use react-navigation to set up my tab bar.⁣&lt;/p&gt;



&lt;p&gt;If you want to dig deeper into the code, check out my GitHub repo:⁣⁣&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mauro-codes" rel="noopener noreferrer"&gt;
        mauro-codes
      &lt;/a&gt; / &lt;a href="https://github.com/mauro-codes/formal-booking" rel="noopener noreferrer"&gt;
        formal-booking
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A React Native barber booking app
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h1&gt;
  
  
  Let me know what you think
&lt;/h1&gt;

&lt;p&gt;I’ll love to hear your thoughts about this project! Is there any specific topic you want me to tackle during the series? Let me know in the comments below.⁣&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>reactnative</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Building a React Native app from scratch</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Tue, 16 Mar 2021 11:04:10 +0000</pubDate>
      <link>https://forem.com/mauro_codes/building-a-react-native-app-from-scratch-2619</link>
      <guid>https://forem.com/mauro_codes/building-a-react-native-app-from-scratch-2619</guid>
      <description>&lt;p&gt;Do you want to learn what it takes to build a real app with React Native?⁣⁣&lt;br&gt;
Today I'm presenting a new series called "Building a React Native app from scratch."⁣⁣&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%2Fi.imgur.com%2FWbuJnjz.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%2Fi.imgur.com%2FWbuJnjz.png" alt="Project Home Page"&gt;&lt;/a&gt;&lt;br&gt;
⁣⁣&lt;/p&gt;

&lt;h1&gt;
  
  
  Scope of the series
&lt;/h1&gt;

&lt;p&gt;You can find thousands of React Native step-by-step tutorials out there. That kind of content is highly focused on the how to do, but I decided to shift the focus of this series and talk more about the what and less about the how.⁣⁣&lt;br&gt;
⁣⁣&lt;br&gt;
Building a mobile application is not just writing code until it's finished. There are tons of things to think about and prepare before even opening your favorite IDE:⁣⁣&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a prototype of each screen of your app.⁣⁣&lt;/li&gt;
&lt;li&gt;Choose a color palette / icons / typography.⁣⁣&lt;/li&gt;
&lt;li&gt;Design the navigation flow between each screen.⁣⁣&lt;/li&gt;
&lt;li&gt;Identify reusable components / define a consistent naming for them.⁣⁣&lt;/li&gt;
&lt;li&gt;Choose a standard nomenclature for methods, components, screens.⁣⁣
⁣⁣&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Besides, during and after development, you'll have to do things like:⁣⁣&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn how to publish your app in the App Store and Google Play⁣⁣&lt;/li&gt;
&lt;li&gt;Test your app using different configurations⁣⁣&lt;/li&gt;
&lt;li&gt;Take screenshots using different sizes for each store.⁣⁣
⁣⁣&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this series, I will share my process with you as I complete all these tasks one by one. In addition, I will add tips and recommendations for each step of the process.⁣⁣&lt;br&gt;
⁣⁣&lt;br&gt;
In the next post, I'll give you an overview of the whole project. There I'll talk about the story behind this project, and I'll dig deeper into the project's scope in terms of screens, features, etc.⁣⁣&lt;br&gt;
⁣⁣&lt;br&gt;
If you want to dig deeper into the code, check out my GitHub repo:⁣⁣&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&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%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mauro-codes" rel="noopener noreferrer"&gt;
        mauro-codes
      &lt;/a&gt; / &lt;a href="https://github.com/mauro-codes/formal-booking" rel="noopener noreferrer"&gt;
        formal-booking
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A React Native barber booking app
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
⁣⁣

&lt;h1&gt;
  
  
  Let me know what you think
&lt;/h1&gt;

&lt;p&gt;I'll love to hear your thoughts about this project! Is there any specific topic you want me to tackle during the series? Let me know in the comments below.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>reactnative</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Switching to Arch Linux</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Tue, 23 Feb 2021 11:34:13 +0000</pubDate>
      <link>https://forem.com/mauro_codes/switching-to-arch-linux-1hm</link>
      <guid>https://forem.com/mauro_codes/switching-to-arch-linux-1hm</guid>
      <description>&lt;blockquote&gt;
&lt;h1&gt;
  
  
  Full disclaimer
&lt;/h1&gt;

&lt;p&gt;I don't hate Windows. It's a great operating system, and I've been using it for decades. And it's totally ok if you use it too. In fact, you may need to use Windows or Mac if your work depends on tools that are not available on Linux. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even though I tried Linux many years ago, I always returned to Windows for different reasons (mostly work and gaming). But my desire to leave Windows behind has grown on me recently, mainly because I've been learning more about the free software movement (free as in freedom).&lt;/p&gt;

&lt;p&gt;Like many of you, I want to get things done, and the idea of having to spend weeks learning how to use a new operating system didn't sound appealing to me. That's why I decided to change my point of view and see it as an occasional hobby.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
💡 If you found this content valuable, you can follow me on &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/mauro.codes/" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Early experiments
&lt;/h1&gt;

&lt;p&gt;After dual-booting Windows 10 and Manjaro Linux, I started to spend a few hours a week doing small experiments within Manjaro. Three months later, and with a better understanding of both the operating system in general and the Linux terminal, I decided to try ArcoLinux and spend even more time on Linux.&lt;/p&gt;

&lt;h1&gt;
  
  
  Finding the right tools
&lt;/h1&gt;

&lt;p&gt;My main concern when switching to Linux was not being able to do my job. I use a few tools every day (like Figma or Notion) that I thought could not be used on Linux. But after some research and experimentation, I managed to get all of those tools working. &lt;/p&gt;

&lt;p&gt;So I decided to share a list of tools/projects/apps I found that enabled me to do my daily job with Linux. A few apps are not strictly required for my job, but they highly improved my experience and boosted my productivity.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  i3 Window Manager
&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%2Fi.imgur.com%2FFvmHfhR.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%2Fi.imgur.com%2FFvmHfhR.png" alt="i3 Window Manager"&gt;&lt;/a&gt;&lt;br&gt;
After doing some research, I learn that there are unlimited customization options for your desktop environment on Linux. You can use a full desktop environment like GNOME, KDE, Mate, Cinnamon, or you can use Window Managers.&lt;/p&gt;

&lt;p&gt;Window Managers are only one of the many components of a desktop environment, and its objective is to control where elements appear on the display. Because I wanted to fully customize my setup (and get a deeper understanding of Linux), I decided to start using i3.&lt;/p&gt;

&lt;p&gt;There are dozens of options out there (xmonad, qtile, dwm, Awesome, Openbox, etc.), but I stick with i3 because it's easy to customize.&lt;/p&gt;

&lt;p&gt;I really love Window Managers because it allows you to move through different windows without leaving the keyboard. Once you get used to them, there is no going back.&lt;/p&gt;

&lt;p&gt;I managed to set up i3 to work with different workspaces on each monitor and open certain apps like VSCode on a specific workspace. In that way, I always have my browser on my left monitor and my code editor on the right one.&lt;/p&gt;

&lt;p&gt;To learn more about i3, &lt;a href="https://i3wm.org/" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Feh
&lt;/h2&gt;

&lt;p&gt;Feh is a lightweight and versatile image viewer. I'm using it to set up my wallpapers on my i3 config file. You may not need this tool if you're using a full desktop environment instead of a window manager like i3. If you want to learn more about Feh, &lt;a href="https://github.com/derf/feh" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Polybar
&lt;/h2&gt;

&lt;p&gt;I wanted to have a custom status bar for my i3 window manager, so after some research, I found Polybar. Polybar is a powerful open-source tool that aims to help users build beautiful and highly customizable status bars for their desktop environment.⁣⁣&lt;/p&gt;

&lt;p&gt;Even though I'm an absolute noob to Polybar, I spend some time customizing my bar to look like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTBwWHSn.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%2Fi.imgur.com%2FTBwWHSn.png" alt="Polybar custom setup"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FTtNSUZc.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%2Fi.imgur.com%2FTtNSUZc.png" alt="Polybar status bar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the things I love about Polybar is that it's modular. Meaning that there are tons of out-of-the-box modules you can add to your bar without prior scripting knowledge.⁣⁣ Besides, you can create your own module if you want, and the documentation for the out-of-the-box modules is fantastic.&lt;/p&gt;

&lt;p&gt;To learn more about Polybar, &lt;a href="https://github.com/polybar/polybar" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Flameshot
&lt;/h2&gt;

&lt;p&gt;Flameshot is the best substitute for the Windows Snipping Tool. It's a powerful yet simple to use screenshot utility. Here you can see an example of how many things you can do with it.&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%2Fflameshot.org%2Fmedia%2FanimatedUsage.gif" 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%2Fflameshot.org%2Fmedia%2FanimatedUsage.gif" alt="Flameshot screenshot software"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to learn more about Flameshot, &lt;a href="https://github.com/flameshot-org/flameshot" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Vysor
&lt;/h2&gt;

&lt;p&gt;I've been working a lot with React Native, and I needed reliable software that lets me cast my phone screen on my desktop environment to control my phone without having to deal with the touch keyboard. Besides, sometimes I need to show a demo of the apps I'm working on, so having the ability to run this tool on Linux was kind of a deal-breaker for me. &lt;/p&gt;

&lt;p&gt;After doing some research, I managed to compile the app following the instructions available on GitHub.&lt;/p&gt;

&lt;p&gt;Here's Vysor, running on my ArcoLinux and casting the screen of my Android Phone:&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%2Fi.imgur.com%2FnarDl1c.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%2Fi.imgur.com%2FnarDl1c.png" alt="Vysor working on ArcoLinux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about Vysor, &lt;a href="https://github.com/koush/vysor.io" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Peek
&lt;/h2&gt;

&lt;p&gt;There's a tool called &lt;a href="https://www.screentogif.com/" rel="noopener noreferrer"&gt;ScreenToGif&lt;/a&gt; that I use a lot on Windows. It allows me to record animated gifs to share on social media quickly. Sadly, it's not available for Linux. Thankfully I found Peek. &lt;br&gt;
Peek is a super simple-to-use gif/video recorder. It's not a general-purpose screencast app with extended features but instead focuses on the single task of creating small screencasts of an area of the screen.&lt;/p&gt;

&lt;p&gt;Here's an example of a GIF generated using Peek.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FBUDmNwg.gif" 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%2Fi.imgur.com%2FBUDmNwg.gif" alt="Example of gif generated using Peek"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about Peek, &lt;a href="https://github.com/phw/peek#about" rel="noopener noreferrer"&gt;follow this link&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  OBS
&lt;/h2&gt;

&lt;p&gt;Open Broadcaster Software (OBS) is a free and open-source, cross-platform streaming and recording program. If you're producing content for YouTube or streaming on Twitch, this program has pretty much everything you'll need to start. &lt;a href="https://obsproject.com/wiki/Home" rel="noopener noreferrer"&gt;Follow this link&lt;/a&gt; to learn more about the project.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Alacritty (Terminal Emulator)
&lt;/h2&gt;

&lt;p&gt;Alacritty is a modern terminal emulator that allows extensive configuration, and it's a GPU-Accelerated Terminal, so it is known for having a good performance. To learn more about Alacritty, &lt;a href="https://github.com/alacritty/alacritty" rel="noopener noreferrer"&gt;follow this link&lt;/a&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%2Fi.imgur.com%2F9s1Bz5e.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%2Fi.imgur.com%2F9s1Bz5e.png" alt="Alacritty Terminal Emulator"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Brave browser
&lt;/h2&gt;

&lt;p&gt;I really love Brave. It's privacy-focused, it's open-source, and it pays you with crypto if you accept to see sponsored ads occasionally. Besides, it's based on Chromium, so the developer tools are excellent. You can learn more about Brave on its &lt;a href="https://brave.com/" rel="noopener noreferrer"&gt;official website&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Spotify
&lt;/h2&gt;

&lt;p&gt;Even though you can't download Spotify for Linux from the official website, you can get Spotify using the Snap package management system. Just type &lt;code&gt;snap install spotify&lt;/code&gt; on your terminal, and you're ready to go. Now you can listen to your favorite music on Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spotify-TUI
&lt;/h3&gt;

&lt;p&gt;If you are into Terminal user interfaces like me, you'll really enjoy &lt;a href="https://github.com/Rigellute/spotify-tui" rel="noopener noreferrer"&gt;Spotify-TUI&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F12150276%2F75177190-91d4ab00-572d-11ea-80bd-c5e28c7b17ad.gif" 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%2Fuser-images.githubusercontent.com%2F12150276%2F75177190-91d4ab00-572d-11ea-80bd-c5e28c7b17ad.gif" alt="Spotify Terminal User Interface"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Lotion (unofficial Notion app for Linux)
&lt;/h2&gt;

&lt;p&gt;Lotion was an unexpected but cool surprise. I found this fantastic project &lt;a href="https://github.com/puneetsl/lotion" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;. It's super easy to install, and it just works!&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%2Fi.imgur.com%2F2fucC16.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%2Fi.imgur.com%2F2fucC16.png" alt="Lotion - Notion unofficial client for Linux"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Figma-Linux
&lt;/h2&gt;

&lt;p&gt;Figma-Linux is an unofficial electron-based Figma desktop app for Linux. You can easily install it using the snap package management tool.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fz33EH9a.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%2Fi.imgur.com%2Fz33EH9a.png" alt="Figma-Linux: Unofficial Figma client for Linux"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about the project, visit the &lt;a href="https://github.com/Figma-Linux/figma-linux" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VSCode
&lt;/h2&gt;

&lt;p&gt;There's no much to say here. VSCode is my favorite IDE, and it's multi-platform. So, if you're working with VSCode on Windows, just know that the Linux client has precisely the same features.&lt;br&gt;
You can find more specific instruction for installation based on your Linux distribution here &lt;a href="https://code.visualstudio.com/docs/setup/linux" rel="noopener noreferrer"&gt;in the official VSCode documentation&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker
&lt;/h2&gt;

&lt;p&gt;Docker is my daily driver to work with things like MongoDB and SQL Server on Linux. Docker is multi-platform, and you can use it on Linux. If you heavily rely on Docker for your daily job, know that you won't find any limitations while using it on Linux.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Final thoughts
&lt;/h1&gt;

&lt;p&gt;I wanted to share my experience in case you're thinking about trying Linux, but you're not sure if that time invested will pay off. &lt;br&gt;
At least for me, Linux has improved my work experience by letting me customize every single piece of the environment. And that's enough for me to keep learning and tweaking.&lt;/p&gt;




&lt;h3&gt;
  
  
  Did you do your daily work on Linux? What's your favorite distro and why?
&lt;/h3&gt;

&lt;h3&gt;
  
  
  I would love to hear about your experience with other Window Managers, so let me know if you tried anyone besides i3.
&lt;/h3&gt;

</description>
      <category>linux</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
    <item>
      <title>5 Tips for effective meetings</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Fri, 12 Feb 2021 11:11:12 +0000</pubDate>
      <link>https://forem.com/mauro_codes/5-tips-for-effective-meetings-40dd</link>
      <guid>https://forem.com/mauro_codes/5-tips-for-effective-meetings-40dd</guid>
      <description>&lt;p&gt;After listening to the last episode of the DevDiscuss podcast with &lt;a class="mentioned-user" href="https://dev.to/ben"&gt;@ben&lt;/a&gt;
, &lt;a class="mentioned-user" href="https://dev.to/jess"&gt;@jess&lt;/a&gt;
, and &lt;a href="https://twitter.com/GoodmanCenter"&gt;Andy Goodman&lt;/a&gt;, I decided to make a post talking about what I've learned.&lt;/p&gt;

&lt;p&gt;By the way, if you want to listen to the full episode, follow &lt;a href="https://dev.to/devdiscuss/s4-e1-this-is-how-you-have-effective-meetings"&gt;this link.&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Prepare your agenda
&lt;/h1&gt;

&lt;p&gt;Having a well-prepared agenda is the single best predictor of a successful meeting. The agenda should cover all the things that have to be covered to prepare people to be effective. Besides, it would help if you didn't think about the agenda as a simple list of topics but as a strategic plan for the next hour of your life.&lt;/p&gt;

&lt;p&gt;Here are a few tips for a well-prepared agenda:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define the objective of the meeting.&lt;/li&gt;
&lt;li&gt;Send invitations to all the participants 24 to 48 hours in advance to discuss who should be there and who doesn't.&lt;/li&gt;
&lt;li&gt;Make a list of topics that should be handled during the meeting.&lt;/li&gt;
&lt;li&gt;For each topic on the list, you may consider including:

&lt;ul&gt;
&lt;li&gt;A notation to explain how the topic will be handled. You can use three kinds of interactions: 

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Information&lt;/strong&gt;: Meaning you'll inform about something.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discuss&lt;/strong&gt;: Meaning that you’re going to bring up a topic here, and you'll ask for feedback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt;: Meaning that this item will lead to an action (making a decision)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;The name of the person who'll handle or present that topic.&lt;/li&gt;
&lt;li&gt;The estimated duration for the item&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You may include a "WW, DW, BW" (Who will do what by when) section at the end of the agenda. There you'll specify the responsible, the responsibility, and the deadline for each task.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Avoid voting; try "Gradients of Agreement."
&lt;/h1&gt;

&lt;p&gt;The thing about voting to make a decision is that there'll always be winners and losers. If you lose, you'll feel like you didn't get what you wanted.&lt;/p&gt;

&lt;p&gt;That's why you could consider using a technique called "Gradients of Agreement" to see where everyone is without making a decision. With this technique, each participant can choose between:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Endorse&lt;/li&gt;
&lt;li&gt;Endorse with reservations&lt;/li&gt;
&lt;li&gt;Abstain&lt;/li&gt;
&lt;li&gt;Disagree, but don't block&lt;/li&gt;
&lt;li&gt;Veto&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ⚠️
&lt;/h2&gt;

&lt;p&gt;If you're faced with &lt;strong&gt;ambiguous support&lt;/strong&gt;, meaning the participants are all over the scale in response to a decision, it could be a sign that the problem was poorly defined.&lt;/p&gt;

&lt;h2&gt;
  
  
  👎
&lt;/h2&gt;

&lt;p&gt;If you're faced with &lt;strong&gt;meager support&lt;/strong&gt;, meaning that although some team members are clustered towards endorsement, others are clustered in the low part of the scale (disagree or veto), you may consider slowing down and search for better ideas.&lt;/p&gt;

&lt;p&gt;If you want to dig deeper into &lt;strong&gt;Gradients of Agreement&lt;/strong&gt;, check out the &lt;a href="https://web.archive.org/web/20160304210428/http://www.teamstarproject.org/pdf/Team%20Decision%20Making.pdf"&gt;following link&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Think about the people
&lt;/h1&gt;

&lt;p&gt;There are some basic rules as to what people expect from a meeting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They want their time to be used constructively and efficiently.&lt;/li&gt;
&lt;li&gt;They want to know what do they need to do to come prepared.&lt;/li&gt;
&lt;li&gt;They want to be clear about what do you expect from them after the meeting as a follow-up.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Keep it short
&lt;/h1&gt;

&lt;p&gt;Even though there are certain types of meetings that could last for hours, most of the time it's really hard to keep everyone's attention for more than 1 hour. This is especially true for online meetings.&lt;/p&gt;

&lt;p&gt;Try to keep your meetings under 1 hour so everyone can contribute in the best possible way.&lt;/p&gt;




&lt;h1&gt;
  
  
  Listen to understand and don't speak just to be heard.
&lt;/h1&gt;

&lt;p&gt;As a participant of the meeting, try to be a good listener:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Listen with the intent to understand, not to respond.&lt;/li&gt;
&lt;li&gt;Try to speak up only if you have something to contribute.&lt;/li&gt;
&lt;li&gt;Avoid speaking just to be heard or to leave your mark on the table.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Final thoughts
&lt;/h1&gt;

&lt;p&gt;As a software developer, I attended thousands of meetings during the last ten years. I witnessed awful discussions and productive conversations.&lt;/p&gt;

&lt;p&gt;I've met with people that like to use meetings as an excuse to take a break and with people that only call a meeting after an exhaustive preparation.&lt;/p&gt;

&lt;p&gt;My experience tells me that meetings can be a game-changer tool if they're used properly. It's up to each organization to follow validated methods and make a clear and complete plan for each meeting to take full advantage of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there any good tip that I'm missing? Let me know in the comments below 👇
&lt;/h3&gt;

</description>
      <category>productivity</category>
      <category>meetings</category>
      <category>learning</category>
    </item>
    <item>
      <title>Linux Terminal: The Ultimate Cheat Sheet - Part 2</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Mon, 01 Feb 2021 11:04:36 +0000</pubDate>
      <link>https://forem.com/mauro_codes/linux-terminal-the-ultimate-cheat-sheet-part-2-11ge</link>
      <guid>https://forem.com/mauro_codes/linux-terminal-the-ultimate-cheat-sheet-part-2-11ge</guid>
      <description>&lt;p&gt;This post is the second part of a series that will help you learn how to benefit from the Linux Terminal. &lt;br&gt;
If you didn't see my first post, I highly recommend taking a look at it before continuing with this one:&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/mauro_codes" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F61298%2F5b6eaa26-8727-47ea-8a94-b7d46951a9f7.PNG" alt="mauro_codes"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/mauro_codes/linux-terminal-the-ultimate-cheat-sheet-2g5b" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Linux Terminal: The Ultimate Cheat Sheet&lt;/h2&gt;
      &lt;h3&gt;Mauro Garcia ・ Jan 25 '21&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#linux&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#terminal&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;&lt;br&gt;&lt;br&gt;
💡 If you found this content valuable, you can follow me on &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/mauro.codes/" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search with Grep&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Search for a string within a file ➜ &lt;code&gt;grep [term-to-search] [source-file-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Case Insensitive Search within a file ➜ &lt;code&gt;grep -i [term-to-search] [source-file-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Search for non-matching lines within a file ➜ &lt;code&gt;grep -v [term-to-search] [source-file-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Recursive search within a directory ➜ &lt;code&gt;grep -r [term-to-search] [path-to-directory-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Multiple searches within a file ➜ &lt;code&gt;grep -E "[first-term-to-search|second-term-to-search]" [source-file-to-search]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Count search results ➜ &lt;code&gt;grep -c [term-to-search] [source-file-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Showing the name of the matching files ➜ &lt;code&gt;grep -l [term-to-search] [matching-files-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Learn more about grep ➜ &lt;code&gt;man grep&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pipes&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;Piping commands ➜ &lt;code&gt;[command 1] | [command 2] | [command n]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Piping filtered search results into a new file ➜ &lt;code&gt;ls | grep [term-to-filter] | cat &amp;gt; [path-to-new-file]/[name-for-new-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Searching through your command history ➜ &lt;code&gt;history | grep "[term-to-search]"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Permissions: Change file mode bits command (chmod)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Add execute permission to everyone ➜ &lt;code&gt;chmod a+x [name-of-the-file]&lt;/code&gt; or &lt;code&gt;chmod +x [name-of-the-file]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Remove execute permission to everyone ➜ &lt;code&gt;chmod a-x [name-of-the-file]&lt;/code&gt; or &lt;code&gt;chmod -x [name-of-the-file]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Add execute permission to the owner ➜ &lt;code&gt;chmod u+x [name-of-the-file]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Remove write permission to others users ➜ &lt;code&gt;chmod o-w [name-of-the-file]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Add read permission to the group ➜ &lt;code&gt;chmod g+r [name-of-the-file]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Remove write and read permission to everyone ➜ &lt;code&gt;chmod a-wr [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Remove write and read permission to everyone for all the files in the current directory ➜ &lt;code&gt;chmod a-wr *.*&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Groups&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;List all the available groups ➜ &lt;code&gt;getent group&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;List all the groups my account is assigned to ➜ &lt;code&gt;groups&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Search for a specific group (using pipes) ➜ &lt;code&gt;getent group | grep [group-name-to-search]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new group ➜ &lt;code&gt;sudo groupadd [name-for-the-new-group]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add an existing user to a secondary group ➜ &lt;code&gt;usermod -a -G [group-you-want-to-add-the-user-to] [user-name-to-add]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ownership: Change file owner and group (chown)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Change user ownership for a file ➜ &lt;code&gt;sudo chown [new-owner-name] [file-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change user ownership for several files ➜ &lt;code&gt;sudo chown [new-owner-name] [file-1-to-change-ownership] [file-n-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change user ownership for a directory ➜ &lt;code&gt;sudo chown [new-owner-name] [directory-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Recursively change user ownership for a directory and all it's files  ➜ &lt;code&gt;sudo chown -R [new-owner-name] [directory-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change group ownership for a file ➜ &lt;code&gt;sudo chown :[new-group-name] [file-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Change user and group ownership for a file ➜ &lt;code&gt;sudo chown [new-owner-name]:[new-group-name] [file-to-change-ownership]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Shortcuts&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Search through your search history ➜ &lt;code&gt;[CTRL] + r&lt;/code&gt;. Then type a few characters to find you command&lt;/li&gt;
&lt;li&gt;Paste previous lines ➜ &lt;code&gt;[CTRL] + p&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor to the beginning of the line. ➜ &lt;code&gt;[CTRL] + a&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor to the end of the line. ➜ &lt;code&gt;[CTRL] + e&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor forward one character. ➜ &lt;code&gt;[CTRL] + f&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor backward one character. ➜ &lt;code&gt;[CTRL] + b&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Erases the complete line. ➜ &lt;code&gt;[CTRL] + u&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Erases the last word typed. ➜ &lt;code&gt;[CTRL] + w&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Working with long files&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Print the last lines for a file ➜ &lt;code&gt;tail [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the last n lines for a file ➜ &lt;code&gt;tail -n [number-of-lines] [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the first lines for a file ➜ &lt;code&gt;head [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the first n lines for a file ➜ &lt;code&gt;head -n [number-of-lines] [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Page through a file ➜ &lt;code&gt;less [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Global regular expression search (grep command)
&lt;/h1&gt;

&lt;p&gt;The Linux &lt;code&gt;grep&lt;/code&gt; command is a string and pattern matching utility that displays matching lines from multiple files.&lt;/p&gt;
&lt;h2&gt;
  
  
  Search for a string within a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep [term-to-search] [source-file-to-search]&lt;/code&gt; to search for a term within a file. You can optionally add the &lt;code&gt;-n&lt;/code&gt; argument if you want to print the line number for each match&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  script.txt

&lt;span class="c"&gt;## Print the content of the index.html file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;index.html
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;DOCTYPE html&amp;gt;
&amp;lt;html &lt;span class="nv"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;&lt;span class="nb"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;meta &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta http-equiv&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"x-ua-compatible"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ie=edge"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"viewport"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; /&amp;gt;

    &amp;lt;title&amp;gt;My Website&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;script &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"js/main.js"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;span class="c"&gt;## Search for "meta" within the index.html file using grep&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep &lt;/span&gt;meta index.html &lt;span class="nt"&gt;-n&lt;/span&gt;
4:    &amp;lt;meta &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt; /&amp;gt;
5:    &amp;lt;meta http-equiv&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"x-ua-compatible"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ie=edge"&lt;/span&gt; /&amp;gt;
6:    &amp;lt;meta &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"viewport"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Case Insensitive Search within a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -i [term-to-search] [source-file-to-search]&lt;/code&gt; to perform a case insensitive search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Print the content of the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;main.js
const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;num1 + num2
&lt;span class="o"&gt;}&lt;/span&gt;

// Call the Sum &lt;span class="k"&gt;function
&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;## Search for "sum" without ignoring case (we get 2 results)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep sum &lt;/span&gt;main.js &lt;span class="nt"&gt;-n&lt;/span&gt;
1:const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
6:sum&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;## Search for "sum" using the ignore case argument (we get 3 results)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep sum &lt;/span&gt;main.js &lt;span class="nt"&gt;-in&lt;/span&gt;
1:const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
5:// Call the Sum &lt;span class="k"&gt;function
&lt;/span&gt;6:sum&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Search for non-matching lines within a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -v [term-to-search] [source-file-to-search]&lt;/code&gt; to get all the lines within a file that don't match with the term&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Print the content of the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;main.js
const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;num1 + num2
&lt;span class="o"&gt;}&lt;/span&gt;

// Call the Sum &lt;span class="k"&gt;function
&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;## Search for each line that doesn't include "sum" (case sensitive)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep sum &lt;/span&gt;main.js &lt;span class="nt"&gt;-v&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;num1 + num2
&lt;span class="o"&gt;}&lt;/span&gt;

// Call the Sum &lt;span class="k"&gt;function&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Recursive search within a directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -r [term-to-search] [path-to-directory-to-search]&lt;/code&gt; to search through nested directories and subdirectories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  script.txt  temp

&lt;span class="c"&gt;## Search recursively for "sum" within the current directory (including sub-directories)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
./index.html:    &amp;lt;p&amp;gt;Calling the &lt;span class="nb"&gt;sum &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt;:&amp;lt;p&amp;gt;
./index.html:    &amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt; TODO: Call the &lt;span class="nb"&gt;sum &lt;/span&gt;&lt;span class="k"&gt;function &lt;/span&gt;and display the value &lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
./main.js:const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
./main.js:sum&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;
./temp/index.html:    &amp;lt;p&amp;gt;Calling the &lt;span class="nb"&gt;sum &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt;:&amp;lt;p&amp;gt;
./temp/index.html:    &amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nt"&gt;--&lt;/span&gt; TODO: Call the &lt;span class="nb"&gt;sum &lt;/span&gt;&lt;span class="k"&gt;function &lt;/span&gt;and display the value &lt;span class="nt"&gt;--&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Multiple searches within a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -E "[first-term-to-search|second-term-to-search]" [source-file-to-search]&lt;/code&gt; to search for multiple terms within a file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Print the content of the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;main.js
const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;num1 + num2
&lt;span class="o"&gt;}&lt;/span&gt;

// Call the Sum &lt;span class="k"&gt;function
&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;

const printMessage&lt;span class="o"&gt;(&lt;/span&gt;message&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        console.log&lt;span class="o"&gt;(&lt;/span&gt;message&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

// Call the printMessage &lt;span class="k"&gt;function
&lt;/span&gt;printMessage&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello world"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;## Search for "sum" or "printMessage" within the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"sum|printMessage"&lt;/span&gt; main.js
const &lt;span class="nb"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;num1, num2&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;10,4&lt;span class="o"&gt;)&lt;/span&gt;
const printMessage&lt;span class="o"&gt;(&lt;/span&gt;message&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
// Call the printMessage &lt;span class="k"&gt;function
&lt;/span&gt;printMessage&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hello world"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Count search results
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -c [term-to-search] [source-file-to-search]&lt;/code&gt; to count how many times a search term appears in the file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  script.txt  temp

&lt;span class="c"&gt;## Count how many times "sum" appears on the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nb"&gt;sum &lt;/span&gt;main.js
2

&lt;span class="c"&gt;## Count how many times "sum" or "printMessage" appears on the main.js file &lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s2"&gt;"sum|printMessage"&lt;/span&gt; main.js
5

&lt;span class="c"&gt;## Recursive count to get how many times "sum" or "printMessage" appears in the current working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s2"&gt;"sum|printMessage"&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
./index.html:2
./main.js:5
./README.md:0
./script.txt:0
./temp/index.html:2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Showing the name of the matching files
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;grep -l [term-to-search] [matching-files-to-search]&lt;/code&gt; to get a list of files that includes the search term&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  about.html  index.html  main.js  script.txt  temp

&lt;span class="c"&gt;## Get a list of html files that contains "&amp;lt;h1&amp;gt;"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;h1&amp;gt;"&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.html
index.html

&lt;span class="c"&gt;## Get a list of html files that contains "&amp;lt;p&amp;gt;"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;p&amp;gt;"&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;.html
about.html
index.html

&lt;span class="c"&gt;## Recursively get a list of files that contains "&amp;lt;p&amp;gt;" within the current directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;p&amp;gt;"&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
./about.html
./index.html
./temp/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Pipes
&lt;/h1&gt;

&lt;p&gt;Pipes are among the most useful command-line features on Linux and allow you to perform complex operations by "piping" multiple operations together, which means that the output of each command within the pipe will serve as an input for the next command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Piping filtered search results into a new file
&lt;/h2&gt;

&lt;p&gt;Let's say I want to get a list of all my blog posts that have the word "svelte" within the title. And I want to write the full list on a new file called svelte-articles.txt.&lt;/p&gt;

&lt;p&gt;We can use pipes to list all my articles, filter those that include "svelte" using grep, and save that filtered list on a new file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check that my current working directory is the "posts" folder that includes all my posts&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/maurogarcia.dev/posts&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/maurogarcia.dev/posts

&lt;span class="c"&gt;## Piping the list of posts with grep to check how many posts include the term "svelte" (I get five items)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/maurogarcia.dev/posts&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;svelte
5

&lt;span class="c"&gt;## Piping the list of post --&amp;gt; Filter svelte posts --&amp;gt; move the content to a new file using cat&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/maurogarcia.dev/posts&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;svelte | &lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /home/mauro_codes/projects/svelte-articles.txt

&lt;span class="c"&gt;## Print the content of our new file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/maurogarcia.dev/posts&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /home/mauro_codes/projects/svelte-articles.txt
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 4.2K Jan 27 18:29 &lt;span class="nt"&gt;-5-things-i-love-about-svelte-&lt;/span&gt;.md
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes  11K Jan 27 18:29 angular-vs-svelte-card-component.md
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 5.3K Jan 27 18:29 component-driven-development-with-svelte.md
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 5.0K Jan 27 18:29 how-to-build-your-next-chrome-extension-with-svelte.md
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 4.7K Jan 27 18:29 sapper-svelte-tailwindcss-boilerplate.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Searching through your command history
&lt;/h2&gt;

&lt;p&gt;You can use pipes to search through your command history using &lt;code&gt;grep&lt;/code&gt; by typing &lt;code&gt;history | grep "[term-to-search]"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Thanks to &lt;a href="https://dev.to/bradnichol"&gt;@bradnichol&lt;/a&gt; for suggesting this approach in my previous post!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Searching for the term svelte on your command history&lt;/span&gt;
mauro_codes@mauro-desktop:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;history&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"svelte"&lt;/span&gt;
  415  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;svelte
  416  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-C&lt;/span&gt; svelte
  417  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; svelte
  418  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; svelte |
  419  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; svelte | &lt;span class="nb"&gt;cat
  &lt;/span&gt;420  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;svelte | &lt;span class="nb"&gt;cat
  &lt;/span&gt;421  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;svelte | &lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /home/mauro_codes/projects/svelte-articles.txt
  422  &lt;span class="nb"&gt;cat&lt;/span&gt; /home/mauro_codes/projects/svelte-articles.txt
  444  &lt;span class="nb"&gt;ls grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; svelte
  445  &lt;span class="nb"&gt;ls&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; svelte
  446  &lt;span class="nb"&gt;cat&lt;/span&gt; /home/mauro_codes/projects/svelte-articles.txt
  448  &lt;span class="nb"&gt;history&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"svelte"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Permissions: Change file mode bits command (chmod)
&lt;/h1&gt;

&lt;p&gt;Changing permissions in Linux is an extensive topic that deserves its own post. But I decided to include a few examples that can come in handy. &lt;/p&gt;

&lt;p&gt;You can use the &lt;code&gt;chmod&lt;/code&gt; command to add or remove the read, write, and execute permissions to different users for one or more files.&lt;/p&gt;

&lt;p&gt;As a reference, here is an example of how the permissions are displayed for each file or directory when we use &lt;code&gt;ls lah&lt;/code&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%2Fi.imgur.com%2Ffpk9bna.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%2Fi.imgur.com%2Ffpk9bna.png" alt="Linux permissions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add the execute permission to everyone
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod a+x [name-of-the-file]&lt;/code&gt; or &lt;code&gt;chmod +x [name-of-the-file]&lt;/code&gt;  to add execute permission to everyone for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Add execute permission to everyone in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove the execute permission to everyone
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod a-x [name-of-the-file]&lt;/code&gt; or &lt;code&gt;chmod -x [name-of-the-file]&lt;/code&gt; to remove execute permission to everyone for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Remove the execute permissions to everyone in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;a-x main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rw-rw-rw-&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add the execute permission to the owner
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod u+x [name-of-the-file]&lt;/code&gt; to add the execute permission only to the owner for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Add the execute permissions only to the owner in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;u+x main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x------&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove write permission to other users
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod o-w [name-of-the-file]&lt;/code&gt; to remove the write permission only to other users (not owner or group) for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Remove the write permission only to other users (not owner or group) in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;o-w main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rwxrwxr-x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add read permission to the group
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod g+r [name-of-the-file]&lt;/code&gt; to add read permission only to the group for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Add the read permission only to the group in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;g+r main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;----r-----&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;----------&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove write and read permission to everyone
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod a-wr [name-of-the-file]&lt;/code&gt; to remove write and read permissions to everyone for a specific file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Remove the write and read permission to everyone in the main.js file&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;a-wr main.js

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove write and read permission to everyone for multiple files
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;chmod a-wr *.*&lt;/code&gt; to remove the write and read permissions to everyone for all the files in the current working directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check file permissions&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;-rwxrwxrwx&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Remove the write and read permissions to everyone for all the files in the current working directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;a-wr &lt;span class="k"&gt;*&lt;/span&gt;.&lt;span class="k"&gt;*&lt;/span&gt;

&lt;span class="c"&gt;## Check permissions again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Groups
&lt;/h1&gt;

&lt;h2&gt;
  
  
  List all the available groups
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;getent group&lt;/code&gt; to get a list including all the available groups in your system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;getent group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
mauro_codes:x:1000:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  List all the groups my account is assigned to
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;groups&lt;/code&gt; to get a list of all the groups you are part of.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List all my groups&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;groups
&lt;/span&gt;mauro_codes adm dialout cdrom floppy &lt;span class="nb"&gt;sudo &lt;/span&gt;audio dip video plugdev netdev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Search for a specific group (using pipes)
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;getent group | grep [group-name-to-search]&lt;/code&gt; to search for a specific group using pipes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List all the groups that contains the term "mauro_codes"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;getent group | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"mauro_codes"&lt;/span&gt;
adm:x:4:syslog,mauro_codes
mauro_codes:x:1000:

&lt;span class="c"&gt;## List all the groups that contains the term "root"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;getent group | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"root"&lt;/span&gt;
root:x:0:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a new group
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo groupadd [name-for-the-new-group]&lt;/code&gt; to create a new group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Create a new group called "development"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;groupadd development

&lt;span class="c"&gt;## Check if the new group was created&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;getent group | &lt;span class="nb"&gt;grep &lt;/span&gt;development
development:x:1001:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Add an existing user to a secondary group
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;usermod -a -G [group-you-want-to-add-the-user-to] [user-name-to-add]&lt;/code&gt; to add an existing user to a secondary group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Add mauro_codes to the secondary group "development"&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nt"&gt;-G&lt;/span&gt; development mauro_codes

&lt;span class="c"&gt;## Check changes&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;getent group | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"mauro"&lt;/span&gt;
adm:x:4:syslog,mauro_codes
dialout:x:20:mauro_codes
mauro_codes:x:1000:
development:x:1001:mauro_codes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Ownership: Change file owner and group (chown)
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Change user ownership for a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown [new-owner-name] [file-to-change-ownership]&lt;/code&gt; to change user ownership for a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check user ownership&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Change user ownership (the root user will be the owner of the main.js file)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;root main.js

&lt;span class="c"&gt;## Check user ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Change user ownership for several files
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown [new-owner-name] [file-1-to-change-ownership] [file-n-to-change-ownership]&lt;/code&gt; to change user ownership for several files at the same time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check user ownership&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Change user ownership (the root user will be the owner of the main.js and script.txt files)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;root main.js script.txt

&lt;span class="c"&gt;## Check user ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Change user ownership for a directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown [new-owner-name] [directory-to-change-ownership]&lt;/code&gt; to change the user ownership for a directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check directories user ownership&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 4.0K
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 28 10:48 ..
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 landing-page
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 22 12:15 personal-blog

&lt;span class="c"&gt;## Change user ownership (the root user will be the owner of the "landing-page" directory)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;root ./landing-page/

&lt;span class="c"&gt;## Check directories user ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 4.0K
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 28 10:48 ..
drwxr-xr-x 1 root        mauro_codes 512 Jan 27 17:49 landing-page
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 22 12:15 personal-blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Recursively change user ownership for a directory and all its files
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown -R [new-owner-name] [directory-to-change-ownership]&lt;/code&gt; to recursively change the user ownership for a directory and all its files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check files ownershop within the landing-page directory&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 root        mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 16:27 temp_dir

&lt;span class="c"&gt;## Recursively change the user ownership (the root user will be the owner &lt;/span&gt;
&lt;span class="c"&gt;## of all the files and directories within the current directory)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; root &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;## Check user ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 0
drwxr-xr-x 1 root        mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        mauro_codes  23 Jan 24 17:31 script.txt
drwxr-xr-x 1 root        mauro_codes 512 Jan 27 16:27 temp_dir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Change group ownership for a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown :[new-group-name] [file-to-change-ownership]&lt;/code&gt; to change the group ownership for a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check group ownership&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Change group ownership (the main.js file will now have "development" as a group)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown&lt;/span&gt; :development main.js

&lt;span class="c"&gt;## Check group ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes development 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Change user and group ownership for a file
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;sudo chown [new-owner-name]:[new-group-name] [file-to-change-ownership]&lt;/code&gt; to change the user and the group ownership for a file at the same time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check ownership&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt

&lt;span class="c"&gt;## Change user and group ownership (the main.js file will now have "development" as a group and root as owner)&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;root:development main.js

&lt;span class="c"&gt;## Check ownership again&lt;/span&gt;
mauro_codes@mauro-desktop:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 17:49 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 27 20:00 ..
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 root        development 206 Jan 27 16:36 main.js
&lt;span class="nt"&gt;---x--x--x&lt;/span&gt; 1 mauro_codes mauro_codes  23 Jan 24 17:31 script.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Shortcuts
&lt;/h1&gt;

&lt;p&gt;Big shout-out to &lt;a href="https://dev.to/bogkonstantin"&gt;@bogkonstantin&lt;/a&gt; and &lt;a href="https://dev.to/samuelabreu"&gt;@samuelabreu&lt;/a&gt; for letting me know about these commands I didn't know.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search through your command history
&lt;/h2&gt;

&lt;p&gt;In the previous post, we saw that we could get a full list of the latest commands we run by typing &lt;code&gt;history&lt;/code&gt;. If you don't want to see the full list but search for a specific command quickly, type &lt;code&gt;[CTRL] + r&lt;/code&gt;. You'll be asked to enter a few characters to get matching commands. You can iterate between those results by typing &lt;code&gt;[CTRL] + r&lt;/code&gt; again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Moving through your commands
&lt;/h2&gt;

&lt;p&gt;There are a few shortcuts you can use to move through your commands:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Paste previous lines ➜ &lt;code&gt;[CTRL] + p&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor to the beginning of the line. ➜ &lt;code&gt;[CTRL] + a&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor to the end of the line. ➜ &lt;code&gt;[CTRL] + e&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor forward one character. ➜ &lt;code&gt;[CTRL] + f&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Moves the cursor backward one character. ➜ &lt;code&gt;[CTRL] + b&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Erases the complete line. ➜ &lt;code&gt;[CTRL] + u&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Erases the last word typed. ➜ &lt;code&gt;[CTRL] + w&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Working with long files
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Print the last lines for a file ➜ &lt;code&gt;tail [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the last n lines for a file ➜ &lt;code&gt;tail -n [number-of-lines] [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the first lines for a file ➜ &lt;code&gt;head [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print the first n lines for a file ➜ &lt;code&gt;head -n [number-of-lines] [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Page through a file ➜ &lt;code&gt;less [name-of-the-file]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let me know if you want me to cover any particular command on a final post!
&lt;/h2&gt;

</description>
      <category>linux</category>
      <category>terminal</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Linux Terminal: The Ultimate Cheat Sheet</title>
      <dc:creator>Mauro Garcia</dc:creator>
      <pubDate>Mon, 25 Jan 2021 12:11:38 +0000</pubDate>
      <link>https://forem.com/mauro_codes/linux-terminal-the-ultimate-cheat-sheet-2g5b</link>
      <guid>https://forem.com/mauro_codes/linux-terminal-the-ultimate-cheat-sheet-2g5b</guid>
      <description>&lt;p&gt;If you're a Linux user, the Terminal is probably the most powerful tool you would ever have. But the thing about the Terminal is that you need to learn how to use it if you want to benefit from it.&lt;/p&gt;

&lt;p&gt;For the last few months, I've been playing with the Terminal a lot, and I came up with a long list of useful commands that I use regularly. Please let me know if I missed something important so I can add it to future posts.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
💡 If you found this content valuable, you can follow me on &lt;a href="https://twitter.com/mauro_codes" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.instagram.com/mauro.codes/" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Basic commands&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Zoom in ➜ &lt;code&gt;[CTRL] + [+]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Zoom out ➜ &lt;code&gt;[CTRL] + [-]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Print working directory ➜ &lt;code&gt;pwd&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Clear the terminal ➜ &lt;code&gt;[CTRL] + [l]&lt;/code&gt; or &lt;code&gt;clear&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Assign an alias ➜ &lt;code&gt;alias [alias-name]="[command-to-run]"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Source a file ➜ &lt;code&gt;source [name-of-the-file-to-read-and-execute]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Change directory command (cd)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Move to a specific directory ➜ &lt;code&gt;cd [name-of-your-directory]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Move to the parent directory ➜ &lt;code&gt;cd ..&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Move to the home directory ➜ &lt;code&gt;cd&lt;/code&gt; or &lt;code&gt;cd ~&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Move to the last directory yo were in ➜ &lt;code&gt;cd -&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;List command (ls)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;List all visible files and directories ➜ &lt;code&gt;ls&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;List all files and directories (include hidden files) ➜ &lt;code&gt;ls -a&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Long Listed Format ➜ &lt;code&gt;ls -l&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Human Readable Format ➜ &lt;code&gt;ls -lh&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Combining arguments: Human Readable Format + Hidden files ➜ &lt;code&gt;ls -lah&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Learn more about the ls command ➜ &lt;code&gt;man ls&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Locate the binary for a program ➜ &lt;code&gt;which [name-of-the-program]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Locate the binary, source and user manual for a program ➜ &lt;code&gt;whereis [name-of-the-program]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Locate files and directories by name ➜ &lt;code&gt;find [path-to-search] -iname [name-of-the-file-you-want-to-search]&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Learn more about the find command ➜ &lt;code&gt;man find&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Get a brief description for a command ➜ &lt;code&gt;whatis [command-name]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;History&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Get previous commands (one by one) ➜ Use the &lt;code&gt;Up Arrow key&lt;/code&gt; ⬆️ to navigate your history&lt;/li&gt;
&lt;li&gt;Get previous commands (full list) ➜ &lt;code&gt;history&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Repeat commands from history (bang command) ➜ &lt;code&gt;history&lt;/code&gt; ➜ &lt;code&gt;![number-of-the-command-to-repeat]&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Repeat last command (bang-bang command) ➜ &lt;code&gt;!!&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Working with files and directories&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Create a new file (without open it) ➜ &lt;code&gt;touch [name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new file using a text editor ➜ &lt;code&gt;vim [name-of-your-file]&lt;/code&gt; or &lt;code&gt;nano [name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy a file ➜ &lt;code&gt;cp [source-path-of-your-file] [destination-path-for-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create a new directory ➜ &lt;code&gt;mkdir [new-directory-name]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Remove an empty directory ➜ &lt;code&gt;rmdir [name-of-the-directory-you-want-to-remove]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove command (rm)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Remove a file ➜ &lt;code&gt;rm [name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Remove a directory recursively (use with caution) ➜ &lt;code&gt;rm -rf [name-of-your-directory]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concatenate command (cat)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;View a single file ➜ &lt;code&gt;cat [name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;View a single file including the line numbers ➜ &lt;code&gt;cat -n [name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy the content of one file to another file ➜ &lt;code&gt;cat [filename-whose-contents-is-to-be-copied] &amp;gt; [destination-filename]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Learn more about the cat command ➜ &lt;code&gt;man cat&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move command (mv)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Move a file ➜ &lt;code&gt;mv [source-path-of-your-file] [destination-path-for-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rename a file ➜ &lt;code&gt;mv [name-of-your-file] [new name-of-your-file]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Basic commands
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Zoom in
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;[CTRL] + [+]&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Zoom out
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;[CTRL] + [-]&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  pwd: Print Working Directory command
&lt;/h2&gt;

&lt;p&gt;It prints the working directory path, starting from the root directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes

mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Clear command
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;clear&lt;/code&gt; or &lt;code&gt;[CTRL] + [l]&lt;/code&gt; to clear the entire terminal screen and get a clean terminal to keep working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alias command
&lt;/h2&gt;

&lt;p&gt;If you usually run a long command regularly and want to save time, you can assign a shorter alias for that command. Type &lt;code&gt;alias [alias-name]="[command-to-run]"&lt;/code&gt; to assign a new alias:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Running the ls command&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;projects

&lt;span class="c"&gt;## Assign an alias, so we don't need to add the arguments every time we need to list something&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;alias ls&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ls -lah"&lt;/span&gt;

&lt;span class="c"&gt;## Running ls again (we get the result of `ls -lah`)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;total 16K
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 17:41 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 root        root         512 Jan 22 10:38 ..
&lt;span class="nt"&gt;-rw-------&lt;/span&gt; 1 mauro_codes mauro_codes 3.0K Jan 22 23:58 .bash_history
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes  220 Jan 22 10:38 .bash_logout
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 3.7K Jan 22 17:32 .bashrc
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes  807 Jan 22 10:38 .profile
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 projects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note that this alias won't be persisted for future uses. If you want to persist your aliases, add them at the end of your .bashrc file located in your home directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Source a file
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;source&lt;/code&gt; command to read and execute the content of a file line by line. Type &lt;code&gt;source [name-of-the-file-to-read-and-execute]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Print the content of the script.txt file (contains two commands)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;script.txt
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"hello world"&lt;/span&gt; &lt;span class="c"&gt;## Print a hello message&lt;/span&gt;
cal                &lt;span class="c"&gt;## Print a calendar&lt;/span&gt;

&lt;span class="c"&gt;## Source the script.txt to run each command inside&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;source &lt;/span&gt;script.txt
hello world

    January 2021
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Change Directory command (cd)
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Move to a specific directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;cd [name-of-your-directory]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check current directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes

&lt;span class="c"&gt;## Change directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;projects/

&lt;span class="c"&gt;## Check new working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Move to the parent directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;cd ..&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check current directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects

&lt;span class="c"&gt;## Move to the parent directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ..

&lt;span class="c"&gt;## Check new working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Move to the home directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;cd ~&lt;/code&gt; or just &lt;code&gt;cd&lt;/code&gt; as an alternative&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check current directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/awesome-app&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/awesome-app

&lt;span class="c"&gt;## Move to the home directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/awesome-app&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~

&lt;span class="c"&gt;## Check new working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Move to the last directory you were in
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;cd -&lt;/code&gt; to navigate to the previous directory you were in&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the current directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/landing-page

&lt;span class="c"&gt;## Move to another directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/mauro_codes/

&lt;span class="c"&gt;## Check the new directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes

&lt;span class="c"&gt;## Go back to the previus directory you were in&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; -
/home/mauro_codes/projects/landing-page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  List command (ls)
&lt;/h1&gt;

&lt;p&gt;Lists the content of the directory you're currently in.&lt;/p&gt;

&lt;h2&gt;
  
  
  List all visible files and directories
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;ls&lt;/code&gt; without any additional argument to get all the files and directories (this command will exclude hidden files like the &lt;a href="https://wiki.archlinux.org/index.php/Dotfiles" rel="noopener noreferrer"&gt;dotfiles&lt;/a&gt;).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects

&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;awesome-app  landing-page  nextjs-tailwindcss-blog-starter  personal-blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  List all files and directories
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;ls -a&lt;/code&gt; to get all the files and directories (including the hidden files)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects

&lt;span class="c"&gt;## List the content for the working directory (including hidden files)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt;
&lt;span class="nb"&gt;.&lt;/span&gt;  ..  .config  .configu  awesome-app  landing-page  nextjs-tailwindcss-blog-starter  personal-blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Long Listed Format
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;ls -l&lt;/code&gt; to get all the visible files and directories including additional metadata like permissions, owner, size and modified date and time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/nextjs-tailwindcss-blog-starter

&lt;span class="c"&gt;## List the content for the working directory (using the long listed format)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt;
total 140
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes   4487 Jan 22 12:55 README.md
drwxr-xr-x 1 mauro_codes mauro_codes    512 Jan 22 12:55 components
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes   1068 Jan 22 12:55 config.ts
drwxr-xr-x 1 mauro_codes mauro_codes    512 Jan 22 12:55 helpers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Human Readable Format
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;ls -lh&lt;/code&gt; to get all the visible files and directories in long-listed format, but with a Human Readable Format (User-friendly file size).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/nextjs-tailwindcss-blog-starter

&lt;span class="c"&gt;## List the content for the working directory (using the long listed format + human readable format)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lh&lt;/span&gt;
total 140K
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 4.4K Jan 22 12:55 README.md
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 components
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 1.1K Jan 22 12:55 config.ts
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 helpers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Combining arguments
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;ls -lah&lt;/code&gt; to get all the files and directories (including hidden files) in Human Readable Format.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/nextjs-tailwindcss-blog-starter

&lt;span class="c"&gt;## List the content for the working directory (include hidden files + human readable format)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/nextjs-tailwindcss-blog-starter&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lah&lt;/span&gt;
total 140K
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 13:08 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 ..
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 .git
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes  362 Jan 22 12:55 .gitignore
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 4.4K Jan 22 12:55 README.md
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 components
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes 1.1K Jan 22 12:55 config.ts
drwxr-xr-x 1 mauro_codes mauro_codes  512 Jan 22 12:55 helpers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Learn more about the &lt;code&gt;ls&lt;/code&gt; command
&lt;/h2&gt;

&lt;p&gt;There are dozens of arguments that you can use with the &lt;code&gt;ls&lt;/code&gt; command. If you want to dig dipper,&lt;br&gt;
type &lt;code&gt;man ls&lt;/code&gt; in your terminal to display the user manual for the &lt;code&gt;ls&lt;/code&gt; command.&lt;/p&gt;
&lt;h1&gt;
  
  
  Search
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Locate the binary for a program
&lt;/h2&gt;

&lt;p&gt;If you want to locate where the binary (executable) for a specific command or program is located. You can use the &lt;code&gt;which&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Locate binary for the ls command&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;which &lt;span class="nb"&gt;ls&lt;/span&gt;
/usr/bin/ls
&lt;span class="c"&gt;## Locate binary for git&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;which git
/usr/bin/git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Locate the binary, source, and user manual for a program
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;whereis&lt;/code&gt; command to locate the binary, source, and user manual for a program. You can use the &lt;code&gt;-b&lt;/code&gt;, &lt;code&gt;-m&lt;/code&gt;, and &lt;code&gt;-s&lt;/code&gt; arguments to limit the results to binaries, manual and source, respectively&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Locate binary, manual, and source for git&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;whereis git
git: /usr/bin/git /mnt/c/Program Files/Git/cmd/git.exe /usr/share/man/man1/git.1.gz
&lt;span class="c"&gt;## Locate only binary and manual for Git, and only the manual for ls command&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;whereis &lt;span class="nt"&gt;-bm&lt;/span&gt; git &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nb"&gt;ls
&lt;/span&gt;git: /usr/bin/git /mnt/c/Program Files/Git/cmd/git.exe /usr/share/man/man1/git.1.gz
&lt;span class="nb"&gt;ls&lt;/span&gt;: /usr/share/man/man1/ls.1.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Locate files and directories by name
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;find [path-to-search] -iname [name-of-the-file-you-want-to-search]&lt;/code&gt; to find any file or directory that contain the given name in their title. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The path to search is optional. If it is not specified, the &lt;code&gt;find&lt;/code&gt; command will run on your current working directory (and its descendants)&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;-iname&lt;/code&gt; argument means that our search will be case insensitive.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;- If you want to learn more about this &lt;span class="nb"&gt;command&lt;/span&gt;, &lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;man find&lt;span class="sb"&gt;`&lt;/span&gt; to display the user manual.
&lt;span class="c"&gt;## Check current working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects

&lt;span class="c"&gt;## Find files that contain "posts" on my current working directory and its descendants&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;find &lt;span class="nt"&gt;-iname&lt;/span&gt; posts
./nextjs-tailwindcss-blog-starter/pages/posts
./nextjs-tailwindcss-blog-starter/posts
&lt;span class="c"&gt;## Find files that contain "posts" on a specific directory and its descendants&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;find ./nextjs-tailwindcss-blog-starter/pages/ &lt;span class="nt"&gt;-iname&lt;/span&gt; posts
./nextjs-tailwindcss-blog-starter/pages/posts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get a brief description for a command
&lt;/h2&gt;

&lt;p&gt;If you don't know what a certain command does, Type &lt;code&gt;whatis [command-name]&lt;/code&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Asking about the cat command&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;whatis &lt;span class="nb"&gt;cat
cat&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;              - concatenate files and print on the standard output
&lt;span class="c"&gt;## Asking about the find command&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects&lt;span class="nv"&gt;$ &lt;/span&gt;whatis find
find &lt;span class="o"&gt;(&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;             - search &lt;span class="k"&gt;for &lt;/span&gt;files &lt;span class="k"&gt;in &lt;/span&gt;a directory hierarchy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  History
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Get previous commands (one by one)
&lt;/h2&gt;

&lt;p&gt;You can access your recent command by pressing the &lt;code&gt;Up Arrow key&lt;/code&gt; ⬆️. This is very useful if you want to repeat your last command. Let's say we move to a specific directory, and then we check our working directory like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Move to a specific directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;projects/awesome-app/

&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/awesome-app&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/awesome-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⬆️ We'll get the &lt;code&gt;pwd&lt;/code&gt; command&lt;/p&gt;

&lt;p&gt;⬆️⬆️ We'll get the &lt;code&gt;cd projects/awesome-app&lt;/code&gt; command&lt;/p&gt;

&lt;h2&gt;
  
  
  Repeat previous commands (full list)
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;history&lt;/code&gt; to get a numerated list containing the previous commands you run. Then, type &lt;code&gt;![number-of-the-command-to-repeat]&lt;/code&gt; to repeat that command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Get the history list&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;history
    &lt;/span&gt;1  &lt;span class="nb"&gt;ls
    &lt;/span&gt;2  clear
    3  &lt;span class="nb"&gt;pwd
    &lt;/span&gt;4  &lt;span class="nb"&gt;mkdir &lt;/span&gt;projects
    5  &lt;span class="nb"&gt;cd &lt;/span&gt;projects

&lt;span class="c"&gt;## Run command number 1 (ls)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;1
projects
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Repeat the last command
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;!!&lt;/code&gt; (bang-bang command) to repeat the last command. This is especially useful when you forgot to add &lt;code&gt;sudo&lt;/code&gt; on your last command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Running update without sudo (Permission denied)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;apt update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open &lt;span class="o"&gt;(&lt;/span&gt;13: Permission denied&lt;span class="o"&gt;)&lt;/span&gt;
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches &lt;span class="o"&gt;(&lt;/span&gt;13: Permission denied&lt;span class="o"&gt;)&lt;/span&gt;
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches &lt;span class="o"&gt;(&lt;/span&gt;13: Permission denied&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;## Using the bang-bang command to append the last command after sudo&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; &lt;span class="o"&gt;!!&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; password &lt;span class="k"&gt;for &lt;/span&gt;mauro_codes:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease &lt;span class="o"&gt;[&lt;/span&gt;109 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease &lt;span class="o"&gt;[&lt;/span&gt;114 kB]
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Working with files and directories
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Create a new file (without open it)
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;touch [name-of-your-file]&lt;/code&gt; to create a new file without open it on a text editor. This is useful if you just want to create an empty file but don't need to change it right now.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/landing-page

&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md

&lt;span class="c"&gt;## Create an empty js file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;main.js

&lt;span class="c"&gt;## List the content for the working directory (including your new file) &lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  main.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a new file using a text editor
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;nano [name-of-your-file]&lt;/code&gt; to create a new file and open it using the text editor &lt;a href="https://www.nano-editor.org/" rel="noopener noreferrer"&gt;nano&lt;/a&gt;. If you want to learn more about nano, you can Type &lt;code&gt;man nano&lt;/code&gt; on your terminal to display the nano user manual.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/landing-page

&lt;span class="c"&gt;## List the content for the working directory &lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  main.js

mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;nano index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running the last command, you'll be able to edit the file using nano:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2F3MxGlF2.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%2Fi.imgur.com%2F3MxGlF2.png" alt="Nano text editor"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Copy a file
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;cp&lt;/code&gt; (Copy) command to copy files and directories&lt;br&gt;
Type &lt;code&gt;cp [source-path-of-your-file] [destination-path-for-your-file]&lt;/code&gt; to copy a file into a new destination.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  temp

&lt;span class="c"&gt;## Copy the README.md file into the temp directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cp &lt;/span&gt;README.md temp/README.md

&lt;span class="c"&gt;## List the content for the working directory and check that your file is still there.&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  temp

&lt;span class="c"&gt;## List the temp directory's content and check if your file was copied.&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;temp/
README.md  index-copy.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a new directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;mkdir [new-directory-name]&lt;/code&gt; to create a new directory in your current working directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index-empty-copy.html  index.html  main.js

&lt;span class="c"&gt;## Create a new directory called "scripts"&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;scripts

&lt;span class="c"&gt;## List the content to check if our new directory was created&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index-empty-copy.html  index.html  main.js  scripts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove an empty directory
&lt;/h2&gt;

&lt;p&gt;Type &lt;code&gt;rmdir [name-of-the-directory-you-want-to-remove]&lt;/code&gt; to remove an empty directory. Please note that this command will only work with empty directories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  temp

&lt;span class="c"&gt;## Remove the "temp" empty directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rmdir &lt;/span&gt;temp

&lt;span class="c"&gt;## List the content and check that the directory was removed&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Remove command (rm)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Remove a file
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;rm [name-of-your-file]&lt;/code&gt; to remove a file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index-copy.html

&lt;span class="c"&gt;## Remove the index-copy.html file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;index-copy.html

&lt;span class="c"&gt;## List the content for the working directory and check that the file was removed&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Remove a directory recursively
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;rm -rfi [name-of-your-directory]&lt;/code&gt; to recursively remove a directory with all its files and sub-directories.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Please be careful!&lt;/strong&gt; This is one of the most dangerous commands you can run. If you run &lt;code&gt;rm -rfi /&lt;/code&gt;, you'll erase your entire root partition. Be sure to specify the path for the directory you want to delete. In this example, In this example, I include the &lt;code&gt;-i&lt;/code&gt; argument to ask for confirmation.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content of the temp folder (It has one file)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;temp/
total 0
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 24 19:45 &lt;span class="nb"&gt;.&lt;/span&gt;
drwxr-xr-x 1 mauro_codes mauro_codes 512 Jan 24 19:44 ..
&lt;span class="nt"&gt;-rw-r--r--&lt;/span&gt; 1 mauro_codes mauro_codes   8 Jan 24 19:45 file.txt

&lt;span class="c"&gt;## Recursively remove the temp folder&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; temp/

&lt;span class="c"&gt;## Check that the temp folder was removed&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;temp/
&lt;span class="nb"&gt;ls&lt;/span&gt;: cannot access &lt;span class="s1"&gt;'temp/'&lt;/span&gt;: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Concatenate command (cat)
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;cat&lt;/code&gt; (concatenate) command to read data from a file and print their content as output&lt;/p&gt;

&lt;h3&gt;
  
  
  View a single file
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;cat [name-of-your-file]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/landing-page

&lt;span class="c"&gt;## Print the content of the index.html file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;index.html
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;DOCTYPE html&amp;gt;
&amp;lt;html &lt;span class="nv"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;&lt;span class="nb"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;meta &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta http-equiv&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"x-ua-compatible"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ie=edge"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"viewport"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; /&amp;gt;

    &amp;lt;title&amp;gt;My Website&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;script &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"js/main.js"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  View a single file including the line numbers
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;cat -n [name-of-your-file]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Check the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;
/home/mauro_codes/projects/landing-page

&lt;span class="c"&gt;## Print the content of the index.html file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; index.html
     1  &amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;DOCTYPE html&amp;gt;
     2  &amp;lt;html &lt;span class="nv"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
     3    &amp;lt;&lt;span class="nb"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
     4      &amp;lt;meta &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt; /&amp;gt;
     5      &amp;lt;meta http-equiv&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"x-ua-compatible"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ie=edge"&lt;/span&gt; /&amp;gt;
     6      &amp;lt;meta &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"viewport"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; /&amp;gt;
     7
     8      &amp;lt;title&amp;gt;My Website&amp;lt;/title&amp;gt;
     9    &amp;lt;/head&amp;gt;
    10
    11    &amp;lt;body&amp;gt;
    12      &amp;lt;script &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"js/main.js"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;/script&amp;gt;
    13    &amp;lt;/body&amp;gt;
    14  &amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Copy the content of one file to another file
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;cat [filename-whose-contents-is-to-be-copied] &amp;gt; [destination-filename]&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## Create an empty file called index-empty-copy.html&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;index-empty-copy.html

&lt;span class="c"&gt;## Copy the content of index.html to index-empty-copy.html&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;index.html &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; index-empty-copy.html

&lt;span class="c"&gt;## Print the content of the index-empty-copy.html file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;index-empty-copy.html
&amp;lt;&lt;span class="o"&gt;!&lt;/span&gt;DOCTYPE html&amp;gt;
&amp;lt;html &lt;span class="nv"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &amp;lt;&lt;span class="nb"&gt;head&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &amp;lt;meta &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta http-equiv&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"x-ua-compatible"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"ie=edge"&lt;/span&gt; /&amp;gt;
    &amp;lt;meta &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"viewport"&lt;/span&gt; &lt;span class="nv"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"width=device-width, initial-scale=1"&lt;/span&gt; /&amp;gt;

    &amp;lt;title&amp;gt;My Website&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;script &lt;span class="nv"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"js/main.js"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Learn more about the &lt;code&gt;cat&lt;/code&gt; command
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;man cat&lt;/code&gt; to display the user manual for the &lt;code&gt;cat&lt;/code&gt; command&lt;/p&gt;

&lt;h2&gt;
  
  
  Move command (mv)
&lt;/h2&gt;

&lt;p&gt;You can use the &lt;code&gt;mv&lt;/code&gt; (move) command for moving and renaming files&lt;/p&gt;

&lt;h3&gt;
  
  
  Move a file
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;mv [source-path-of-your-file] [destination-path-for-your-file]&lt;/code&gt; to move a file into a new directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index-empty-copy.html  index.html  main.js  temp

&lt;span class="c"&gt;## Move the index-empty-copy.html file to the temp directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;index-empty-copy.html temp/index-empty-copy.html

&lt;span class="c"&gt;## List the content again and check that the file is no longer in the current working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;README.md  index.html  main.js  temp

&lt;span class="c"&gt;## List the temp folder and check that the file is now there.&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls &lt;/span&gt;temp/
index-empty-copy.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Rename a file
&lt;/h3&gt;

&lt;p&gt;Type &lt;code&gt;mv [name-of-your-file] [new name-of-your-file]&lt;/code&gt; to rename a file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
&lt;span class="c"&gt;## List the content for the working directory&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;index-empty-copy.html

&lt;span class="c"&gt;## Rename the index-empty-copy.html file&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;index-empty-copy.html index-copy.html

&lt;span class="c"&gt;## List the content for the working directory (check if your file's name was updated)&lt;/span&gt;
mauro_codes@DESKTOP-HIQ7662:~/projects/landing-page/temp&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls
&lt;/span&gt;index-copy.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Final words
&lt;/h1&gt;

&lt;p&gt;I missed tons of powerful commands on this post, but I decided to keep them for a future post. This is already huge.😄 &lt;/p&gt;

&lt;h3&gt;
  
  
  I would love to hear your feedback about this format. Is it clear? Is it useful? Let me know if you want me to cover any particular command on my next post.
&lt;/h3&gt;

</description>
      <category>linux</category>
      <category>terminal</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
