<?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: Shad Mirza</title>
    <description>The latest articles on Forem by Shad Mirza (@iamshadmirza).</description>
    <link>https://forem.com/iamshadmirza</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%2F142602%2F7cc24d1d-c457-4c9a-9b73-1935763d6542.jpg</url>
      <title>Forem: Shad Mirza</title>
      <link>https://forem.com/iamshadmirza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/iamshadmirza"/>
    <language>en</language>
    <item>
      <title>MongoDB Simplified Part 2: How to Setup?</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Fri, 14 Aug 2020 03:46:46 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/mongodb-simplified-part-2-how-to-setup-4ehl</link>
      <guid>https://forem.com/iamshadmirza/mongodb-simplified-part-2-how-to-setup-4ehl</guid>
      <description>&lt;p&gt;Hello amazing people, we are back with Part 2 of the MongoDB Simplified series. In the &lt;a href="https://iamshadmirza.com/mongodb-simplified-part-1-what-why-and-how-ckdk9gmqv031cz2s12bqz8r1c"&gt;last article&lt;/a&gt;, we learned about MongoDB and NoSQL in general, now it's time to set up and get it running on our machine. Let's start!&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Download and install MongoDB locally
&lt;/h2&gt;

&lt;p&gt;We are going to download the Community Server from MongoDb website. This is the free version that lets us test stuff on our machine.&lt;/p&gt;

&lt;p&gt;Head over to &lt;a href="https://www.mongodb.com/try/download/community"&gt;download page for Community Server&lt;/a&gt; and select your operating system. Hit download and install to the default location when the download is finished.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For Mac user: You will extract the file from &lt;code&gt;.tgz&lt;/code&gt; package and paste it to your preferred location inside the &lt;code&gt;mongodb&lt;/code&gt; directory.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 2: Setup Environment variable
&lt;/h2&gt;

&lt;p&gt;Once your install is finished, you will see the "mongodb" directory which will contain a &lt;code&gt;bin&lt;/code&gt; folder with a bunch of other files.  &lt;/p&gt;

&lt;p&gt;This &lt;code&gt;bin&lt;/code&gt; folder is important and we will use the files inside to &lt;strong&gt;execute various operations like connecting to MongoDB server&lt;/strong&gt;, importing data, etc. &lt;/p&gt;

&lt;p&gt;Open the terminal on Mac or command prompt on windows and type &lt;code&gt;mongod&lt;/code&gt;. This command is used to connect to the MongoDB server. You might see a &lt;code&gt;command not found&lt;/code&gt; error which means our machine can't find the file it needs to connect to MongoDB server. 😓&lt;/p&gt;

&lt;p&gt;Remember we just talked about the mighty &lt;code&gt;bin&lt;/code&gt; folder which &lt;strong&gt;has the files needed to connect to MongoDB server&lt;/strong&gt;. We just need to tell our machine about that location. &lt;/p&gt;

&lt;p&gt;To add &lt;code&gt;PATH&lt;/code&gt; to that bin folder in &lt;strong&gt;Windows&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the bin folder inside "Program Files" and copy the path to &lt;code&gt;mongod&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Go to "Edit environment variables" settings either by searching or right-clicking on My Computer.&lt;/li&gt;
&lt;li&gt;Choose the "Path" variable and add a new entry with the location you just copied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To add &lt;code&gt;PATH&lt;/code&gt; to that bin folder on a &lt;strong&gt;Mac&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the bin folder and copy the path to &lt;code&gt;mongod&lt;/code&gt; file by clicking "Get info"&lt;/li&gt;
&lt;li&gt;Go to user folder and search for &lt;code&gt;.bash_profile&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Edit it and paste this line at the end: &lt;code&gt;export PATH=YOUR_COPIED_PATH:$PATH&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make sure to replace &lt;code&gt;YOUR_COPIED_PATH&lt;/code&gt; with the location of your bin folder. It will look something like this: &lt;code&gt;export PATH=/Users/shad/development/mongodb/bin:$PATH&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once you're done, close the terminal and start again. Type &lt;code&gt;mongo --version&lt;/code&gt; and you should be able to see the version. 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Setup MongoDB "data" directory
&lt;/h2&gt;

&lt;p&gt;We need a place to store data and for that, we need to create a data folder. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;code&gt;data&lt;/code&gt; folder at your preferred location.&lt;/li&gt;
&lt;li&gt;Copy path to that location (we have to tell MongoDB about its location).&lt;/li&gt;
&lt;li&gt;Open terminal and type &lt;code&gt;mongodb --dbpath "/data/db"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Make sure you type your path. For me, it's &lt;code&gt;"/data/db"&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's it 🎉. I hope you successfully finished the setup and able to get it running. &lt;/p&gt;

&lt;p&gt;In the next article, we will build a TODO application with Node and MongoDB from scratch (no prior knowledge needed -- I will explain everything from the very basics). Stay tuned for Part 3 of MongoDB Simplified and take care.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.twitter.com/iamshadmirza"&gt;Shad&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>node</category>
      <category>javascript</category>
      <category>nosql</category>
    </item>
    <item>
      <title>MongoDB Simplified Part 1: What, Why and How?</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Fri, 14 Aug 2020 03:44:48 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/mongodb-simplified-part-1-what-why-and-how-47dl</link>
      <guid>https://forem.com/iamshadmirza/mongodb-simplified-part-1-what-why-and-how-47dl</guid>
      <description>&lt;p&gt;This is the first article of series &lt;strong&gt;MongoDB Simplified&lt;/strong&gt; which will cover all the basics of MongoDB. I will try to keep things as simple as possible.&lt;/p&gt;

&lt;p&gt;We will start from understanding &lt;strong&gt;What is MongoDB?&lt;/strong&gt;, &lt;strong&gt;How does it work?&lt;/strong&gt;, &lt;strong&gt;Pros and Cons?&lt;/strong&gt;, &lt;strong&gt;How to set up on your machine&lt;/strong&gt; going all the way to learning &lt;strong&gt;how to perform basic CRUD operations&lt;/strong&gt;. CRUD is short for Create, Read, Update and Delete if you're wondering. So let's start.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is MongoDB?
&lt;/h2&gt;

&lt;p&gt;MongoDB is a database that is &lt;strong&gt;based on document model&lt;/strong&gt;. It is a non-relational type database.  &lt;/p&gt;

&lt;p&gt;Now, what are relational and non-relational databases? 🤔  &lt;/p&gt;

&lt;p&gt;Assume RDBMS (Relational Database Management System) &lt;strong&gt;like an "Excel Sheet"&lt;/strong&gt; with &lt;strong&gt;Rows&lt;/strong&gt; and &lt;strong&gt;Columns&lt;/strong&gt; to save data in the form of tables. This table will have a unique ID to identify each row and where multiple fields are distributed along the column. These types of databases usually have relationships between them, &lt;strong&gt;hence the name "Relational Database"&lt;/strong&gt; 💡.  &lt;/p&gt;

&lt;p&gt;Whereas &lt;strong&gt;MongoDB&lt;/strong&gt; (DBMS) saves data in &lt;strong&gt;JSON-like documents&lt;/strong&gt; inside a collection having no relationships with other documents hence they are called "Non-Relationship Database" types. &lt;strong&gt;Example&lt;/strong&gt; of JSON like object is shown below 👇🏼:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"123"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Shad Mirza"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"hobbies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Coding, Art, Writing"&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;/div&gt;



&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A record in MongoDB is a document.&lt;/strong&gt; Now, what's a document? 🤔&lt;/p&gt;

&lt;p&gt;A document is a data structure composed of field and value pairs. A MongoDB document is similar to &lt;strong&gt;JSON object&lt;/strong&gt; &lt;em&gt;(see above example)&lt;/em&gt; but uses a variant called &lt;strong&gt;BSON (Binary JSON)&lt;/strong&gt; that accommodates more data types. These documents are inserted separately which are unaware of other documents. (Non-Relational type, remember?)&lt;/p&gt;

&lt;p&gt;It means that &lt;strong&gt;records are not restricted to have the same number of columns&lt;/strong&gt; (which is a must in RDBMS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; A collection of &lt;code&gt;Employees&lt;/code&gt; can have multiple documents of each &lt;code&gt;employee&lt;/code&gt; with a different number of &lt;code&gt;key-value&lt;/code&gt; pairs i.e. one employee can have one phone number while other can have two phone numbers and that is totally fine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"101"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ramesh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"personalNumber"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9123456789"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&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;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"102"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Suresh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"personalNumber"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9123456788"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"workNumber"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"8123456789"&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;/div&gt;



&lt;p&gt;Now suppose we are using a relational database, then we are bound to use the same number of columns for each data.&lt;/p&gt;

&lt;p&gt;What it means in the current example is that we would have to add a &lt;code&gt;workNumber&lt;/code&gt; column for all the employees &lt;strong&gt;regardless of whether they need this field or not&lt;/strong&gt;. This will result in "Ramesh" having an empty value in &lt;code&gt;workNumber&lt;/code&gt; column 😓.  &lt;/p&gt;

&lt;p&gt;Without the restrictions of columns, the developer can add documents however they need without worrying that a little change will break everything 🤩.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MongoDB&lt;/strong&gt; allows you to structure data in a way that is &lt;strong&gt;efficient for computers to process&lt;/strong&gt; and &lt;strong&gt;easily readable for humans&lt;/strong&gt; providing a natural way of storing and processing data across the application.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MongoDB is a distributed database&lt;/strong&gt;, which means it provides three fundamental features that developers have to implement themselves otherwise. That's why it is so loved by the developer's community. Those 3 features are:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fault tolerance:&lt;/strong&gt; This allows &lt;strong&gt;MongoDB&lt;/strong&gt; to have multiple copies of data, so if somehow one server fails, you will have the other one to serve the data. Single server failure doesn't affect the application as you always have multiple copies in which you can rely on. It uses a single master architecture for data consistency, with secondary databases that maintain copies of the primary database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; MongoDB scales across multiple servers to store and process data. So, you can just add more servers as the data volumes and performance grows instead of upgrading the mainframe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data availability:&lt;/strong&gt; You can move data across the globe where you have the requirement for faster processing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understand NoSQL and SQL
&lt;/h2&gt;

&lt;p&gt;Countless wars ⚔️ have been fought over debating SQL vs NoSQL and answer still stays the same, &lt;strong&gt;"It depends on "&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
Let's get to the basics. &lt;strong&gt;What's the dedicated purpose of a database?&lt;/strong&gt; 🤔&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Storing Data"&lt;/strong&gt; right?. Now in this context, let's understand what are the differences between SQL &amp;amp; NoSQL database and how they store data.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structure:&lt;/strong&gt; SQL stores data in &lt;code&gt;tables&lt;/code&gt; which contains &lt;code&gt;rows&lt;/code&gt; and &lt;code&gt;columns&lt;/code&gt;. It is well structured and as SQL is &lt;em&gt;Relational Database&lt;/em&gt;, it usually has some relations between different tables &lt;em&gt;(Primary Key, Foreign Key, etc)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; Because of these relations and * well-defined* structure, SQL avoids &lt;em&gt;data duplication&lt;/em&gt; and is relatively faster for joins, queries, updates, etc. Sounds good right? But wait...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility:&lt;/strong&gt; This also means that you need to plan the structure ahead of time and any changes to that will difficult (relations remember? tables are connected. You can't simply change one and not take care of the other side).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Big Data:&lt;/strong&gt; Since the changes need to be applied at various places and the data is broken into various logical tables (we will see how in a minute). It requires performing a various read operations on multiple tables to get what we want. Big Data requires data READ and WRITE queries to be fastest, hence SQL might not a better choice for that. Although you can use SQL databases for a large scale deployment because...&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community:&lt;/strong&gt; SQL is a mature technology, it's been there for ages and there are many experienced developers who understand it very well. This means that there is great support available and you will definitely find help if you get stuck somewhere and you can easily find a lot of independent consultants who can help with the deployment of large scale SQL databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; In almost all situations SQL databases are &lt;code&gt;vertically scalable&lt;/code&gt;. This means that you can increase the load on a single server by increasing things like RAM, CPU, or SSD. It s robust and it has proven that it can handle possibly anything. It follows &lt;a href="https://blog.sqlauthority.com/2007/12/09/sql-server-acid-atomicity-consistency-isolation-durability/"&gt;ACID&lt;/a&gt; properties (Atomicity, Consistency, Isolation, and Durability).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Employee Table:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;employee_id&lt;/th&gt;
&lt;th&gt;employee_name&lt;/th&gt;
&lt;th&gt;number&lt;/th&gt;
&lt;th&gt;work_number&lt;/th&gt;
&lt;th&gt;address&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Shad&lt;/td&gt;
&lt;td&gt;9988776655&lt;/td&gt;
&lt;td&gt;9876543210&lt;/td&gt;
&lt;td&gt;121&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Vamsi&lt;/td&gt;
&lt;td&gt;8877665544&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;122&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Girish&lt;/td&gt;
&lt;td&gt;7766554433&lt;/td&gt;
&lt;td&gt;null&lt;/td&gt;
&lt;td&gt;123&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Address Table:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;address_id&lt;/th&gt;
&lt;th&gt;city&lt;/th&gt;
&lt;th&gt;country&lt;/th&gt;
&lt;th&gt;pincode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;121&lt;/td&gt;
&lt;td&gt;Varanasi&lt;/td&gt;
&lt;td&gt;India&lt;/td&gt;
&lt;td&gt;221000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;122&lt;/td&gt;
&lt;td&gt;Delhi&lt;/td&gt;
&lt;td&gt;India&lt;/td&gt;
&lt;td&gt;212345&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;123&lt;/td&gt;
&lt;td&gt;Hubli&lt;/td&gt;
&lt;td&gt;India&lt;/td&gt;
&lt;td&gt;564635&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  🧐 Few things to notice in this example:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The two tables are interconnected with the &lt;code&gt;FOREIGN KEY&lt;/code&gt; in the &lt;code&gt;address&lt;/code&gt; column. This key can be used as id to reference the address table.&lt;/li&gt;
&lt;li&gt;SQL follows a certain structure, hence the column &lt;code&gt;work_number&lt;/code&gt; is required whether we need it (for a particular row) or not (look at the null value for the second and third-row).&lt;/li&gt;
&lt;li&gt;To read the information about an employee, we have to query the &lt;code&gt;employee&lt;/code&gt; table and then &lt;code&gt;address&lt;/code&gt; table or we have to JOIN these two first and the get the data.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  NoSQL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structure:&lt;/strong&gt; NoSQL stores data in a document-based model inside JSON like objects which contain &lt;code&gt;key-value&lt;/code&gt; pairs. There is no standard schema definition for NoSQL databases and the collections don't have relations between them. You can add chunks of data together without splitting them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; Because of this, you can insert and retrieve all the data at once. Also, NoSQL databases are specifically designed for unstructured data. A particular data entity is stored together and not partitioned. So performing read or write operations on a single data entity is faster for NoSQL databases as compared to SQL databases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexibility:&lt;/strong&gt; Dynamic schema enables MySQL databases to change as the user wants. They are not connected and hence you don't need to worry about breaking things whenever to want to add something new.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Big Data:&lt;/strong&gt; Since the schema is flexible and READ-WRITE queries are much faster, NoSQL suits best for Big Data application. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community:&lt;/strong&gt; NoSQL is comparatively new and support is not as rich as SQL but it's growing at a rapid rate. Also, only limited outside experts are available for setting up and deploying large scale NoSQL deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; NoSQL databases are &lt;code&gt;horizontally scalable&lt;/code&gt;. This means that more traffic can be handled by adding more servers. NoSQL database follows the &lt;a href="https://howtodoinjava.com/hadoop/brewers-cap-theorem-in-simple-words/"&gt;Brewers CAP theorem&lt;/a&gt; (Consistency, Availability, and Partition tolerance) but ACID properties have also been introduced in the recent version.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight"&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;"_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"employeeName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Shad"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9988776655"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"workNumber"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"9876543210"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"address"&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;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Varanasi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"India"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"pincode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"221000"&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="err"&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;"_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"employeeName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Vamsi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"8877665544"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"address"&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;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Delhi"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"India"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"pincode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"212345"&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="err"&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;"_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"employeeName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Girish"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"7766554433"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"address"&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;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hubli"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"India"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"pincode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"564635"&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;"techStack"&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="nl"&gt;"_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"565"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"tech"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"React"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"experience"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"3 Years"&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="nl"&gt;"_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"867"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"tech"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MobX"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"experience"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2 Years"&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="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  🧐 Few things to notice in this example:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;There is no relationship between different objects in a collection. We can start adding new &lt;code&gt;key-value&lt;/code&gt; pairs as we want. (On adding a new column in SQL, we have to deal with all the rows previously added, they will be assigned null values for the new field added).&lt;/li&gt;
&lt;li&gt;The collection doesn't need to contain a specific number of values. We don't need &lt;code&gt;workNumber&lt;/code&gt; in the second and third object so we don't save it at all, no null values.&lt;/li&gt;
&lt;li&gt;We are eventually going to need all the user info at once (including &lt;code&gt;address&lt;/code&gt;) and we can easily get it in a single API call by &lt;em&gt;saving them together&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Having a JSON like an object &lt;strong&gt;allows us to store complex structure&lt;/strong&gt; without worrying too much. See the last record where we are storing &lt;strong&gt;"techStack"&lt;/strong&gt; in an array of objects 😵. This kind of flexibility comes very handy when you're trying to prototype something really quick.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Pros and Cons
&lt;/h2&gt;

&lt;p&gt;MongoDB is not a replacement of Relational Database, &lt;strong&gt;it's an alternative&lt;/strong&gt;. Both have their advantages and disadvantages and we must know when to use what.&lt;/p&gt;

&lt;p&gt;This is the time where we clear that &lt;strong&gt;It depends&lt;/strong&gt; debate. Let's go through the pros and cons to understand this better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros 🥳
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Data is stored in a single blob of a JSON object. Insertion and retrieval is easy.&lt;/li&gt;
&lt;li&gt;No need to store &lt;code&gt;NULL&lt;/code&gt; values: Every JSON object is independent.&lt;/li&gt;
&lt;li&gt;Flexible Schema: Consider a scenario where you want to add one more column in Person table. Adding new data in SQL database requires some changes to be made like backfilling data, altering schemas. It means that all the already inserted values will get affected too.
But in case of NoSQL, new data can be easily inserted as it does not require any prior steps. The older collection doesn't know about the next JSON object so you can start adding new fields right away.&lt;/li&gt;
&lt;li&gt;Built for scale: NoSQL databases properly follow Brewers CAP theorem (Consistency, Availability, and Partition tolerance).&lt;/li&gt;
&lt;li&gt;Built for aggregation: We can collect intelligent data like average salary, maximum age, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons 😓
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Not a good choice if you have a lot of updates to perform (for example DELETE followed by INSERT).&lt;/li&gt;
&lt;li&gt;NoSQL is built for scalability, it means you can store a lot of data efficiently but it is not built for complex queries. Ofcourse you can use NoSQL for heavy transactional purpose. However, it is not the best fit for this. (MongoDB has released it's new version 4.2.0 recently which promises secure transactions so this point might get excluded in future, let's see how it goes.)&lt;/li&gt;
&lt;li&gt;JOINS are harder to perform. If you want matching data from two different collection then you have to manually merge and retreive the data. Whereas SQl (because of relationship between tables) provide inbuilt support for JOINS.&lt;/li&gt;
&lt;li&gt;SQL is an aged technology, it means that it is trusted, has been used in lot of scenarios and it has a huge community support. You will most probably find a solution if you get stuck somewhere whereas NoSQL is comparatively young.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it for this article and I hope it was helpful. In the next part, we will learn how to setup MongoDB on our machine and start using it. Until then, take care 👋, wear mask and happy coding. 😋&lt;br&gt;&lt;br&gt;
Shad&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>node</category>
      <category>nosql</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How I set up Notion for Productive Sanity</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Sun, 26 Apr 2020 08:09:59 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/how-i-set-up-notion-for-productive-sanity-na7</link>
      <guid>https://forem.com/iamshadmirza/how-i-set-up-notion-for-productive-sanity-na7</guid>
      <description>&lt;p&gt;Hey everyone, today I'm going to give a walkthrough of how I set up my Notion workspace and organize my ideas. It will be a step-by-step guide and I hope this helps you. Let's start with a question.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do you want?
&lt;/h2&gt;

&lt;p&gt;I would suggest you sit down, take a pen &amp;amp; paper and write exactly what you need. These will be the things that you want to organize. There are tons of customization possible with the Notion and it's one of the reasons that makes it so overwhelming. Having a list of requirements will help you narrow down the structure. Always remember, &lt;strong&gt;If something works for you, it's the right thing.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Our Notion workspace will have a homepage that serves as a roadmap for all the pages inside. It will contain sections of different schemes which will consist of one or more pages each. So, this is what we are gonna organize:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Home Page&lt;/li&gt;
&lt;li&gt;Ideas Section&lt;/li&gt;
&lt;li&gt;Productivity Section&lt;/li&gt;
&lt;li&gt;Project Section&lt;/li&gt;
&lt;li&gt;Learning Path Section&lt;/li&gt;
&lt;li&gt;Using Relations in Databases&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These sections will vary upon your needs so you don't have to add everything I'm listing here. Let's start with Home Page.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Home Page Setup
&lt;/h2&gt;

&lt;p&gt;This is pretty straight forward. We are just laying the ground for all of our important stuff. Follow the steps below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new workspace&lt;/li&gt;
&lt;li&gt;Start without a template.&lt;/li&gt;
&lt;li&gt;Delete everything on the page&lt;/li&gt;
&lt;li&gt;Rename your page as per your preference, add a nice icon and a background. It will look something like this now.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oIeU6ZtN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oIeU6ZtN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-1.png" alt="'desk'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is going to be the container for everything we want to add.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. Ideas Section Setup
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Press the &lt;strong&gt;"+"&lt;/strong&gt; button. Select &lt;strong&gt;Heading 2&lt;/strong&gt; from the options that appear. We are going to divide our Home Page into small sections.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--099vUB5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--099vUB5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-2.png" alt="'heading'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After adding a heading, go to the next line and &lt;strong&gt;add a page.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I arrange my ideas on a Kanban board and move them to different stages as I progress. Go ahead, select &lt;strong&gt;Board&lt;/strong&gt; from &lt;strong&gt;Database&lt;/strong&gt; section. Here is the outcome:  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dC75iR9Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dC75iR9Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-3.png" alt="'heading'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I'll do the same thing for Talk ideas, Drawing ideas, and Generic ideas. Time for a trick: &lt;strong&gt;Create Duplicate is your friend.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on the right-most three dots on your page and select &lt;strong&gt;Duplicate&lt;/strong&gt;.  &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZWvaBulr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZWvaBulr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-4.png" alt="'duplicate'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will create an exactly similar page. When the page is created, edit title, icon, cover, and remove the irrelevant cards and you are done. Repeat this for all the ideas you want to manage, here is the outcome: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xizmqBvZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xizmqBvZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-5.png" alt="'ideas'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tip: Add icon and cover to make things pretty. I have moved &lt;strong&gt;No status view&lt;/strong&gt; to end. I'll add items in &lt;strong&gt;Not started&lt;/strong&gt; section and move those cards to &lt;strong&gt;Completed&lt;/strong&gt; as I proceed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's move on to the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Productivity Section Setup
&lt;/h2&gt;

&lt;p&gt;Go to the next line, add H2 heading &lt;strong&gt;Productivity&lt;/strong&gt; and rearrange the position according to your choice &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---0H4lyXb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---0H4lyXb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-6.png" alt="'productivity'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My productivity section has 2 pages&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Daily Tasks&lt;/li&gt;
&lt;li&gt;Habit Tracker&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Daily Tasks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add a new page in the productivity section.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Calendar&lt;/strong&gt; from &lt;strong&gt;Database&lt;/strong&gt; and add the title, icon, and cover. It will look something like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BJmXwNN3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BJmXwNN3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-7.png" alt="'daily-task'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on &lt;strong&gt;"New"&lt;/strong&gt; and select &lt;strong&gt;"+ New template"&lt;/strong&gt;. This will create a template that we can use each time we add a task to a new day.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9wiKUfsM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9wiKUfsM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-8.png" alt="'new-template'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've created my template something like this, you can customize based on your preference.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EmIZY6fT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EmIZY6fT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-9.png" alt="'template'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go back and click on "New" when you're done creating the template. You will see your template below. It will auto-populate everything for you which you can edit.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Habit tracker
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add a new page in the productivity section.&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Template&lt;/strong&gt; and browse the template gallery. You will find a Habit Tracker template which you can import by clicking &lt;strong&gt;Duplicate&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Here is the &lt;a href="https://www.notion.so/Habit-Tracker-aba86e2b65fd46b89808194784d50484"&gt;link&lt;/a&gt; to the template I'm using.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Our desk progress so far:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tnOtJBjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-10.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tnOtJBjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-10.png" alt="'progress'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Project Section Setup
&lt;/h2&gt;

&lt;p&gt;This is similar to how we created the "Ideas" section. Just create a new "Project" heading and add the page below. I will be using Boards, feel free to experiment, and see what suits you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wdG9xq1w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wdG9xq1w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-11.png" alt="'project'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It will be a good idea to add separate pages for separate projects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  5. Learning Path Setup
&lt;/h2&gt;

&lt;p&gt;When I'm learning something, I list out the things that I need to cover and create a todo list. This list will be in the order that I'm going to visit them. Our Board database can come handy in such use-cases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OAAKLqlr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAAKLqlr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-13.png" alt="'project'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Using Relations in Databases
&lt;/h2&gt;

&lt;p&gt;We are using Databases here, and just like our relational databases, these pages can also have relations among them. You can refer to a different page inside a page. Go to &lt;strong&gt;Add property&lt;/strong&gt; and select &lt;strong&gt;Relation&lt;/strong&gt; inside the &lt;strong&gt;Advanced&lt;/strong&gt; section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W8YpEAkU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W8YpEAkU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-12.png" alt="'relation'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When this is useful?
&lt;/h3&gt;

&lt;p&gt;Suppose you're working for a bunch of clients and you have a database with there names and other important info. Let's name this database &lt;strong&gt;Clients&lt;/strong&gt;. Let's say you have another page &lt;strong&gt;Project Name&lt;/strong&gt; and you want to refer the client inside this project management page. You can easily do this by using &lt;strong&gt;Relation&lt;/strong&gt; property of notion. Similarly, multiple columns can be connected to different pages. It becomes pretty handy if you know how to use it. 😉&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Read &lt;a href="https://www.notion.so/Relations-rollups-fd56bfc6a3f0471a9f0cc3110ff19a79#60feffab60594403a347fb0f62c01203"&gt;this&lt;/a&gt; article for a detailed walkthrough.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I hope this is enough to get you started. You can explore the template gallery to see what's useful for you. There is no right or wrong here. What works for you is perfect so choose your preference and organize stuff.&lt;br&gt;
This is how my complete setup looks: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r0wd_XRE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-14.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r0wd_XRE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/notion-guide/image-14.png" alt="'full-setup'"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>notion</category>
      <category>guide</category>
      <category>productivity</category>
      <category>tips</category>
    </item>
    <item>
      <title>Introducing React Native Design System (RNDS) 🎉🎉</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Thu, 06 Feb 2020 08:53:58 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/introducing-react-native-design-system-rnds-eg1</link>
      <guid>https://forem.com/iamshadmirza/introducing-react-native-design-system-rnds-eg1</guid>
      <description>&lt;p&gt;Hey guys, I have been working on a library for a while now. It's a Design System around React Native and this blog answers some of the common questions that you might stumble while going through the &lt;a href="https://github.com/iamshadmirza/react-native-design-system" rel="noopener noreferrer"&gt;repo&lt;/a&gt;. So let's start 😁.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is RNDS 🧐?
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;RNDS&lt;/code&gt; in short for &lt;code&gt;React Native Design System&lt;/code&gt;. It's a set of component library and design rules that lets you build React Native apps faster. It's documented, tested in production and works on &lt;code&gt;Android&lt;/code&gt;, &lt;code&gt;iOS&lt;/code&gt; and &lt;code&gt;Web&lt;/code&gt;. Visit this &lt;a href="https://rnds.netlify.com" rel="noopener noreferrer"&gt;link&lt;/a&gt; for documentation.&lt;/p&gt;

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

&lt;p&gt;This title seems a little better than a generic title &lt;em&gt;Motivation&lt;/em&gt;. So &lt;em&gt;Why bother to create a library?&lt;/em&gt;&lt;br&gt;&lt;br&gt;
I was working on different projects and copy-pasting components I built over this past year.&lt;br&gt;
I thought (like most devs) that it will be a good idea to make a package out of it and import it in any project.&lt;br&gt;&lt;br&gt;
I did exactly that! I wanted something to prototype faster and it was a perfect solution.&lt;br&gt;&lt;br&gt;
At first, I decided to add a bunch of props which is common across all the components to have a low API surface area because seriously &lt;em&gt;Who wants to remember a lot of props to use a component library?&lt;/em&gt;&lt;br&gt;&lt;br&gt;
I tried making it close to React Native itself so that I don't have to learn anything new. My goal was to create something that lets you get started in 10 minutes or less. (which is not that easy, I realized later 😅). I'm gonna go through my approach in the next section as &lt;code&gt;Failures&lt;/code&gt; because that's where the magic happens.&lt;/p&gt;
&lt;h1&gt;
  
  
  Failures and Learnings
&lt;/h1&gt;

&lt;p&gt;I will discuss my failures and what I learned while making this. Most of the things are pretty common if you're familiar with design systems but I had to learn the hard way. I was solving my own problems.&lt;/p&gt;
&lt;h2&gt;
  
  
  API
&lt;/h2&gt;

&lt;p&gt;I wanted flexibility, freedom to create any component real quick so I added a bunch of props like &lt;code&gt;size&lt;/code&gt;, &lt;code&gt;color&lt;/code&gt; initially.&lt;br&gt;&lt;br&gt;
&lt;code&gt;Size&lt;/code&gt; prop was supposed to take an integer value like &lt;code&gt;size={17}&lt;/code&gt;. There was some calculation involved to create a component of an appropriate size but possibilities were endless. I can basically create a component from size say &lt;code&gt;10&lt;/code&gt; to say &lt;code&gt;100&lt;/code&gt;. I just had to try a bunch of numbers and see what fits.&lt;br&gt;&lt;br&gt;
&lt;code&gt;color&lt;/code&gt; was supposed to take a &lt;code&gt;hex code&lt;/code&gt; of color and it will be the color of a component say &lt;code&gt;Button&lt;/code&gt;. When you're working on a project, all you get is a color and it's easy to pass like that. So what failed?&lt;br&gt;&lt;br&gt;
If you're experienced dev, you might have already guessed what an idiot I am but hear me out. The problem was &lt;strong&gt;With too much freedom comes too much inconsistency.&lt;/strong&gt;   &lt;/p&gt;

&lt;p&gt;I provided &lt;code&gt;size&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt; to each usage of &lt;em&gt;say&lt;/em&gt; &lt;code&gt;Button&lt;/code&gt; in a project and it's difficult to maintain consistency when there are so many options available. &lt;code&gt;size={16}&lt;/code&gt; and &lt;code&gt;size={17}&lt;/code&gt; looks almost similar but are not. This was a big failure in terms of pixel-perfect design.&lt;br&gt;&lt;br&gt;
The second problem was passing the hex code to &lt;code&gt;color&lt;/code&gt; prop. There aren't a lot of buttons when it comes to a real app. It means I was passing one single color to each and every button for no reason 😑.&lt;/p&gt;

&lt;p&gt;The solution was using a tokenized system of configuration and restricting the possibilities to a bare minimum which covers most of the cases.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The key is to find the balance between Freedom and Consistency.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Customization and Consistency
&lt;/h2&gt;

&lt;p&gt;So as we talked above, the solution for inconsistency was defining all the component-specific configurations in a single file. It solved one more problem than it was supposed. Now, with everything in one place, it was much easier to customize components.&lt;br&gt;
Suppose, I got 7 sizes of buttons as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;buttonSize&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="s1"&gt;xxsmall&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xsmall&lt;/span&gt;&lt;span class="dl"&gt;'&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;small&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;large&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xlarge&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xxlarge&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It means I can simply do this to assign a different size according to my requirements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;buttonSize&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;medium&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This also helps in making things consistent. There can be 7 different sizes of components and I feel that's enough. Any more than that will just introduce ambiguity. You can always modify things (or add more) in the theme file. This also works well for colors. Suppose, we have initially defined colors in theme file is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;brandColor&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="s1"&gt;primary&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="s1"&gt;#1e88e5&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="s1"&gt;secondary&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="s1"&gt;#f9a825&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="s1"&gt;tertiary&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="s1"&gt;#e53935&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="s1"&gt;background&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="s1"&gt;#f8f8f8&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can easily change primary (or any) brand color as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;brandColor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;primary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#aeea00&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sweet! Let's move on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design Language
&lt;/h2&gt;

&lt;p&gt;Everything is interlinked with one another. Solving the first and second problems solved a third problem which I had no idea.&lt;br&gt;&lt;br&gt;
Communication was a problem with the earlier approach of &lt;code&gt;size&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt;. You need to tell the exact (number of) sizes and (string) Hex code if you want someone to create a button for you. Token-based theme and restricting sizes eliminated this issue as well.&lt;br&gt;&lt;br&gt;
You just have to say that "Hey, can you create a &lt;em&gt;medium&lt;/em&gt; size button with a &lt;em&gt;primary&lt;/em&gt; color?" That's it. It favors better communication and avoids confusion.&lt;/p&gt;
&lt;h2&gt;
  
  
  Design Rules
&lt;/h2&gt;

&lt;p&gt;Prototyping an app is much more than just dropping components on a screen. Space matters a lot more than actual components when you're working on the frontend. Managing space on each component was my first approach but it was difficult.&lt;br&gt;&lt;br&gt;
I added a few separate components which take care of space only. These are &lt;code&gt;Layout components&lt;/code&gt; like &lt;code&gt;Stack&lt;/code&gt;, &lt;code&gt;Inline&lt;/code&gt;, &lt;code&gt;Box&lt;/code&gt; and &lt;code&gt;Card&lt;/code&gt;. Their sole purpose is to provide spacing to their children. You can go to the playground of Stack in the documentation for a live demo.&lt;br&gt;&lt;br&gt;
All the other components like &lt;code&gt;Button&lt;/code&gt;, &lt;code&gt;Badge&lt;/code&gt;, etc have &lt;code&gt;0 margins&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This separates the concerns in two:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A normal component should worry about only one thing: rendering a component of appropriate size.&lt;/li&gt;
&lt;li&gt;A layout component should worry only about providing space to the component.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are a bunch of other rules that will be discussed later in these articles (Also available on docs).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Layout components are inspired/stolen from &lt;a href="https://github.com/seek-oss/braid-design-system#readme" rel="noopener noreferrer"&gt;Braid Design System&lt;/a&gt; 🙈&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Documentation
&lt;/h2&gt;

&lt;p&gt;What good is a library if you don't know how to use it. A design system at its minimum is the sum of Design Library + Design Rules + Documentation and it is supposed to boost your productivity. Which is certainly not possible if you waste your time figuring out how to use a component.&lt;/p&gt;

&lt;p&gt;After creating the whole library, I instantly googled "How to document your library like a pro" and decided to use &lt;a href="https://github.com/reactjs/react-docgen" rel="noopener noreferrer"&gt;React DocGen&lt;/a&gt;. I wrote half the documentation but it wasn't working out well so I decided to go with &lt;a href="https://www.docz.site/docs/introduction" rel="noopener noreferrer"&gt;Docz&lt;/a&gt;. It's really good and I re-wrote the whole documentation for Docz but...&lt;/p&gt;

&lt;p&gt;Then I went to a &lt;a href="https://www.linkedin.com/posts/iamshadmirza_designsystem-activity-6607961343033212928-zumR" rel="noopener noreferrer"&gt;Design System Meetup&lt;/a&gt; organized by JSLovers and someone suggested to use &lt;a href="https://storybook.js.org/" rel="noopener noreferrer"&gt;StoryBook&lt;/a&gt; instead. It was perfect and exactly what I needed. It's an interactive playground not only helps you explore the components but also enables to create them in isolation a lot faster. With &lt;code&gt;StoryBook&lt;/code&gt;, you don't even have to have to read the whole documentation. Just playing with the component in the playground is enough.&lt;/p&gt;

&lt;p&gt;So, for the third, I decided to rewrite the whole documentation with &lt;code&gt;StoryBook&lt;/code&gt; in &lt;code&gt;MDX&lt;/code&gt; and that's the final version that you will see at &lt;a href="https://rnds.netlify.com" rel="noopener noreferrer"&gt;rnds.netlify.com&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;There were other complications/hurdles on using &lt;code&gt;MDX&lt;/code&gt; with React Native but I won't go in that much detail. &lt;/p&gt;
&lt;h2&gt;
  
  
  Logo
&lt;/h2&gt;

&lt;p&gt;After working so hard, all I wanted was it to be perfect and look at what I created at first 😂 👇&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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Flogo-1.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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Flogo-1.png" alt="first logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First thought, definitely not good 😣. So, after much thinking I created these, thanks to my photoshop skills:&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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Flogo-2.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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Flogo-2.png" alt="second logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks good but I can do better. So this is the final version after giving a hell lot of thoughts 👇.&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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Frnds_logo_main.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%2Fraw.githubusercontent.com%2Fiamshadmirza%2FBlogsByShad%2Fmaster%2Fblogs%2Frnds-intro%2Frnds_logo_main.png" alt="final logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This looks pretty satisfying and states my thoughts on why I created this too. &lt;/p&gt;

&lt;p&gt;So these were a few of my failures while working on this. I learned a lot of things from webpack configs to compound components and a lot that I can't cover in this article. I know there are other great libraries available like &lt;a href="https://nativebase.io/" rel="noopener noreferrer"&gt;NativeBase&lt;/a&gt; and &lt;a href="https://react-native-elements.github.io/react-native-elements/" rel="noopener noreferrer"&gt;React Native Element&lt;/a&gt; but I was just trying to solve my own problems and this is the result of going through a lot of iteration.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://twitter.com/sanketsahu" rel="noopener noreferrer"&gt;Sanket Sahu&lt;/a&gt; and &lt;a href="https://twitter.com/dabit3" rel="noopener noreferrer"&gt;Nader Debit&lt;/a&gt; have done a great job on the libraries mentioned above. The name &lt;code&gt;React Native Design System&lt;/code&gt; was suggested by Nader himself and I'm thankful to him for helping me in building this.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Design Rules
&lt;/h1&gt;

&lt;p&gt;This section is the core of this library and I have spent most of my time iterating this to make it better. &lt;em&gt;&lt;code&gt;It's not much but it's honest work.&lt;/code&gt;&lt;/em&gt;&lt;br&gt;&lt;br&gt;
It is based on the four key aspects that I considered while creating this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Feel free to send a PR for corrections, these are personal opinion and I'm here to learn. 😅&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  1. Low surface area
&lt;/h2&gt;

&lt;p&gt;Most of the props are common across all components or they are the same as their parent component imported from React Native. This makes sure that you do not have to learn a whole set of extra props or just use what you already know.&lt;br&gt;&lt;br&gt;
For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If it's a Button, it receives all the props of Touchable component of React Native.&lt;/li&gt;
&lt;li&gt;If it's a Modal, it receives all the props of Modal.&lt;/li&gt;
&lt;li&gt;Each component receives a &lt;code&gt;size&lt;/code&gt; prop whose value can be one of these: &lt;code&gt;xxsmall&lt;/code&gt;, &lt;code&gt;xsmall&lt;/code&gt;, &lt;code&gt;small&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;large&lt;/code&gt;, &lt;code&gt;xlarge&lt;/code&gt; &amp;amp; &lt;code&gt;xxlarge&lt;/code&gt;. You just have to pass &lt;code&gt;size&lt;/code&gt; prop with one of these value and you're done.&lt;/li&gt;
&lt;li&gt;Another example could be &lt;code&gt;color&lt;/code&gt; prop. You can pass one of the colors defined in &lt;code&gt;brandColor&lt;/code&gt; of the theme to any component.&lt;/li&gt;
&lt;li&gt;If it's a layout based component like &lt;code&gt;Box&lt;/code&gt;, &lt;code&gt;Stack&lt;/code&gt;, &lt;code&gt;Inline&lt;/code&gt; or our best friend &lt;code&gt;Card&lt;/code&gt; then it receives a &lt;code&gt;space&lt;/code&gt; prop. This also takes one of the values between &lt;code&gt;xxsmall&lt;/code&gt; and &lt;code&gt;xxlarge&lt;/code&gt; (with the addition of &lt;code&gt;space="none"&lt;/code&gt;)  and provide appropriate spacing between components.&lt;/li&gt;
&lt;li&gt;Each component receives a &lt;code&gt;style&lt;/code&gt; and a &lt;code&gt;textStyle&lt;/code&gt; prop (if there is a text involved). This is for some rare cases when you have to override the default styling. It's preferable to tweak the &lt;code&gt;theme&lt;/code&gt; instead to maintain consistency and avoid adding that &lt;code&gt;style&lt;/code&gt; again and again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These props are common to all the components. Other component-specific props are pretty straight forward too. &lt;/p&gt;
&lt;h2&gt;
  
  
  2. Speed
&lt;/h2&gt;

&lt;p&gt;For most of the cases, default styles like &lt;code&gt;size={medium}&lt;/code&gt; or &lt;code&gt;space={medium}&lt;/code&gt; will be enough. In other cases, it's just two to three props max to achieve any desired result. This makes it faster to prototype. The layout components make it easier to achieve the desired screen layout with &lt;code&gt;space&lt;/code&gt; props. See the playground in &lt;code&gt;Stack&lt;/code&gt; documentation.&lt;/p&gt;

&lt;p&gt;One of the key aspects of pixel-perfect design is the spacing between components. This design system proposes two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Every UI component has a margin of 0.&lt;/li&gt;
&lt;li&gt;The spacing of any component will be determined by its parent Layout component.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The separation of concerns makes the job easier.  Layout component should take care of &lt;code&gt;space&lt;/code&gt; only and UI component should worry about UI only i.e., &lt;code&gt;color&lt;/code&gt; or &lt;code&gt;size&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Consistency
&lt;/h2&gt;

&lt;p&gt;The correct balance of freedom and consistency is hard to achieve.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For freedom, you get straight forward props like &lt;code&gt;color&lt;/code&gt; and &lt;code&gt;size&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;For consistency, you need to define these configurations inside theme file i.e &lt;strong&gt;Single source of truth&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It helps in maintaining uniformity across all the usage. It also allows you to have several choices and use them as needed. Check out the theme section of this guide for the default configuration.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Connection
&lt;/h2&gt;

&lt;p&gt;Big problems are always more manageable when broken into smaller pieces. The design language of the system is broken down into color, typography, size, and space. These API is followed by each component.&lt;/p&gt;
&lt;h3&gt;
  
  
  Color
&lt;/h3&gt;

&lt;p&gt;There are basically two types of colors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;brandColor:&lt;/strong&gt; "primary", "secondary", "tertiary", "background", "disabled", "semitransparent".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;textColor:&lt;/strong&gt; "default", "heading", "grey", "subtle", "disabled", and "white"&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Typography
&lt;/h3&gt;

&lt;p&gt;To keep things simple and consistent. There are two choices for fonts to use: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;heading &lt;/li&gt;
&lt;li&gt;text &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Size
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The available sizes you can use is &lt;code&gt;"xxsmall"&lt;/code&gt;, &lt;code&gt;"xsmall"&lt;/code&gt;, &lt;code&gt;"small"&lt;/code&gt;, &lt;code&gt;"medium"&lt;/code&gt;, &lt;code&gt;"large"&lt;/code&gt;, &lt;code&gt;"xlarge"&lt;/code&gt; and &lt;code&gt;"xxlarge"&lt;/code&gt;. The default is &lt;code&gt;"medium"&lt;/code&gt; and it will be applied if are not passing anything.&lt;/li&gt;
&lt;li&gt;Font size is also similar and it ranges from "xxsmall" to "xxlarge".&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Space
&lt;/h3&gt;

&lt;p&gt;Space also shares similar API as size but with one addition. You can also pass &lt;code&gt;"none"&lt;/code&gt; with the range of &lt;code&gt;"xxsmall"&lt;/code&gt; to &lt;code&gt;"xxlarge"&lt;/code&gt;. Space is a dedicated prop for layout components like &lt;code&gt;Stack&lt;/code&gt;, &lt;code&gt;Inline&lt;/code&gt;, &lt;code&gt;Box&lt;/code&gt; and &lt;code&gt;Card&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can contribute to the theme. Please share what are the common color tokens you use, what are the common font sizes that you use in any app, etc. Let's make the theme config more generic together.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Getting Started
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Simply go to the command line and run this 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 react-native-design-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use &lt;code&gt;yarn&lt;/code&gt; or &lt;code&gt;npm&lt;/code&gt; as per your choice.&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;react-native-design-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This library needs &lt;code&gt;react-native-vector-icons&lt;/code&gt; so go on and install that too to get all the cool icons. Check out &lt;a href="https://github.com/oblador/react-native-vector-icons#installation" rel="noopener noreferrer"&gt;Install guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1. Import &lt;code&gt;ThemeProvider&lt;/code&gt; and &lt;code&gt;theme&lt;/code&gt; then wrap your root component.
&lt;/h3&gt;

&lt;p&gt;This step is important. We are passing &lt;code&gt;theme&lt;/code&gt; as context value that each component will access.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//your root component&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;ThemeProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;theme&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="s1"&gt;react-native-design-system&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&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;ThemeProvider&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;theme&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;Root&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="sr"&gt;/ThemeProvider&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;/div&gt;



&lt;h3&gt;
  
  
  Step 2. Use component.
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//inside any file&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="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-design-system&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;HomeScreen&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;Button&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;Press&lt;/span&gt; &lt;span class="nx"&gt;Me&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Visit &lt;a href="https://rnds.netlify.com/?path=/docs/guide-get-started--page" rel="noopener noreferrer"&gt;this&lt;/a&gt; for more info.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Reference:
&lt;/h1&gt;

&lt;p&gt;Thanks to each person who helped me feedbacks. Other than that, these were talks and article which helped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=KtQO5MhnfEc" rel="noopener noreferrer"&gt;ReactLive 2019 - What goes into building a design system by Siddharth Kshetrapal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=jnV1u67_yVg&amp;amp;t=769s" rel="noopener noreferrer"&gt;ReactiveConf 2019 - Rethinking Design Practices by Mark Dalgleish&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=fHQ1WSx41CA" rel="noopener noreferrer"&gt;ReactConf 2019 - Building (And Re-Building) the Airbnb Design System | Maja Wichrowska &amp;amp; Tae Kim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=Dd-Y9K7IKmk&amp;amp;t=1204s" rel="noopener noreferrer"&gt;React Advanced 2019 - Design Systems Design System by Siddharth Kshetrapal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://publication.design.systems/distilling-how-we-think-about-design-systems-b26432eefef9" rel="noopener noreferrer"&gt;Distilling How We Think About Design Systems by Sarah Federman&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://uxdesign.cc/everything-you-need-to-know-about-design-systems-54b109851969" rel="noopener noreferrer"&gt;Everything you need to know about Design Systems by Audrey Hacq&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;If this feels interesting, please drop a star on the repo. Click on this &lt;a href="https://github.com/iamshadmirza/react-native-design-system" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
Contributions are most welcome, you can reach &lt;a href="https://github.com/iamshadmirza/react-native-design-system/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;here&lt;/a&gt; to read contribution guidelines.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>designsystem</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Learn React Native Animation by building Circular Progress Bar</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Tue, 03 Dec 2019 13:31:24 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/learn-react-native-animation-by-building-circular-progress-bar-4fe7</link>
      <guid>https://forem.com/iamshadmirza/learn-react-native-animation-by-building-circular-progress-bar-4fe7</guid>
      <description>&lt;p&gt;Today, we are going to build a circular progress bar using &lt;code&gt;Animated&lt;/code&gt; library of react native with the help of &lt;em&gt;three semicircles&lt;/em&gt;. Let's understand the concept first then we will dive into coding.&lt;/p&gt;

&lt;h1&gt;
  
  
  Concept
&lt;/h1&gt;

&lt;p&gt;We have a base outer circle that serves as a container for the other three semicircles. We will rotate these semicircles with &lt;code&gt;transform&lt;/code&gt; property to achieve the desired result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---E7GS-4G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---E7GS-4G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb1.png" alt="base"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How do three circles work?
&lt;/h2&gt;

&lt;p&gt;Their working depends on the value of progress. It can either be less than or greater than 50. Let's see the two possible cases: &lt;/p&gt;

&lt;h2&gt;
  
  
  Case 1. If progress percentage &amp;lt; 50
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. First Circle
&lt;/h3&gt;

&lt;p&gt;The first circle (purple) is initialized with a rotation of 180 degrees and completely covers the right portion of the outer base circle (grey).  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8v-CagBf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8v-CagBf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb2.png" alt="first circle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Second Circle
&lt;/h3&gt;

&lt;p&gt;The second circle is rendered on top of the first circle (purple) with the same rotation and backgroundColor equal to the outer base circle (grey). It makes the first circle disappear as grey color completely overshadows the inner purple circle.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QAB645U9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QAB645U9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb3.png" alt="first circle"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I have reduced the opacity of the upper (grey) circle to show what's happening.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When the user clicks to animate, we are rotating the upper (grey) circle which is slowly revealing the inner (purple) circle from behind.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GKS7dF4Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GKS7dF4Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb4.gif" alt="first circle"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Inner circle (purple) is not moving at all. We are rotating the upper circle (semi-transparent here) to show the inner circle from behind.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Third Circle
&lt;/h3&gt;

&lt;p&gt;The third semicircle is initialed with 0-degree rotation thus covers the left half of the base outer circle. Its background color is grey (same as the base circle).&lt;br&gt;&lt;br&gt;
Remember, the second circle (grey on right) is moving clockwise and taking some of the left halves of the outer circle. It looks something like this:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LnCnjvBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LnCnjvBw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb5.png" alt="overlap"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Hence, the third (left grey) circle has a higher elevation which enables it to overlap the extra portion of the second circle on the left side.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--elwlZtZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--elwlZtZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb6.gif" alt="overlap-gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Case 2. If progress percentage &amp;gt; 50
&lt;/h2&gt;

&lt;p&gt;Initially, all three semicircles are initialed with 0-degree rotation and cover the left half of the outer base circle (grey). The first circle is at the bottom then second on top it and third on top of second as it has the highest elevation. This leaves the right half of the base circle empty.  &lt;/p&gt;
&lt;h3&gt;
  
  
  1. First Circle
&lt;/h3&gt;

&lt;p&gt;Both first and second circles (both purple at left) will slowly rotate to cover the right half from 0 to 180 degrees together. This covers the animation to 50%.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0MrjgWcj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0MrjgWcj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb7.gif" alt="right half"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Now first circle stops and second circle takes over to complete the remaining rotation.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Second circle
&lt;/h3&gt;

&lt;p&gt;The first circle's job is to take up to 50% of progress and then the second circle will rotate some more to cover the remaining percentage.&lt;br&gt;
I have made the second circle semi-transparent to show you how it's working. (the third circle is removed for simplicity). This is typically the case for &lt;code&gt;percent={70}&lt;/code&gt;:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X0tiE5Oa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X0tiE5Oa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb8.gif" alt="more than half"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So 50% area covered by first circle and 20% area covered by the second circle adds up to complete the animation. But wait, what about the third circle? It is still on top of the second one and we can't see the second circle which is behind. Let's see what our third circle is doing.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Third circle.
&lt;/h2&gt;

&lt;p&gt;We will rotate the third and second circle for the same degrees clockwise (extra 20% in the current example). It will leave space so that the second circle becomes visible. To show clearly, the third circle is yellow right now and first &amp;amp; second are removed.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jV_W74Il--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jV_W74Il--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb9.gif" alt="third"&gt;&lt;/a&gt;   &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you see the problem here?&lt;/strong&gt; As our third circle rotates clockwise, it takes some portion of the right half and overlays the first circle &lt;em&gt;(third has higher elevation, remember?)&lt;/em&gt;.&lt;br&gt;&lt;br&gt;
The solution is simple and you might have guessed it already. Toggle the elevation value so the third circle goes inside the first circle.&lt;br&gt;&lt;br&gt;
&lt;strong&gt;First Circle&lt;/strong&gt; is semi-transparent right now so you can see how the third (yellow) circle is going behind the first one (semitransparent). After toggling elevation:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fXUvF3VM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb10.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fXUvF3VM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb10.gif" alt="third overlap"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;I hope it is clear what's happening. Let's correct the colors and see our final animation!  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jdAjp-s2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb11.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jdAjp-s2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb11.gif" alt="color corrected"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks good, isn't it? Let's add a smaller inner circle so our view can start looking more like a progress bar. &lt;/p&gt;
&lt;h2&gt;
  
  
  Inner circle
&lt;/h2&gt;

&lt;p&gt;A smaller inner circle goes on top of everything creating an appearance of a progress bar.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ACJon6Zg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb12.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ACJon6Zg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/circular-progress-bar/cpb12.gif" alt="final result"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Let's code
&lt;/h1&gt;

&lt;p&gt;There are 5 steps involved:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Render base circle&lt;/li&gt;
&lt;li&gt;Initialize default animation values&lt;/li&gt;
&lt;li&gt;Render three semicircles&lt;/li&gt;
&lt;li&gt;Add animation to semicircles.&lt;/li&gt;
&lt;li&gt;Render inner circle&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 1: Render base circle
&lt;/h2&gt;

&lt;p&gt;Render the base container circle with a grey color background. It is going to contain the other three semicircles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt;
  &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&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;outerCircle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;passiveColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;//grey color&lt;/span&gt;
    &lt;span class="p"&gt;},&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Initialize default animation values
&lt;/h2&gt;

&lt;p&gt;Initialize default values for all the three semicircles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//for first and second circle&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialValueHalfCircle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&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;180&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//for third circle&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialValueInnerCircle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//initialize animated values to interpolate over degree of rotation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstCircleAnimatedValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Animated&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="nx"&gt;initialValueHalfCircle&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;secondCircleAnimatedValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Animated&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="nx"&gt;initialValueHalfCircle&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;thirdCircleAnimatedValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Animated&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="nx"&gt;initialValueInnerCircle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;//initialize time for rotation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;duration&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;360&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//first circle is always purple&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstCircleColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;activeColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//for first case: second circle was overlapping with grey background when progress &amp;lt; 50 &lt;/span&gt;
&lt;span class="c1"&gt;//for second case: it was completing the animation after 50% with active purple color&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secondCircleColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;activeColor&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;passiveColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Render three semicircles
&lt;/h2&gt;

&lt;p&gt;We are going to render three semicircles, so let's write a helper function to make our job easier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;renderHalf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;transforms&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;otherStyles&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt;
      &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&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;half&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;borderColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;transform&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="na"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;transforms&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;translateX&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.004&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="nx"&gt;otherStyles&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="c1"&gt;//children&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Animated.View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It takes a &lt;code&gt;color&lt;/code&gt; prop and a &lt;code&gt;transform&lt;/code&gt; prop to &lt;code&gt;rotate&lt;/code&gt; the semicircles clockwise. Let's not worry about the logic right now and call this function to render our first semicircle.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstCircleColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate1&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;Note: &lt;code&gt;firstCircleColor&lt;/code&gt; is activeColor (purple) in both cases.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's receiving &lt;code&gt;rotate1&lt;/code&gt; value which is interpolation of animated value we initialised in previous step. It simply maps &lt;code&gt;1 integer value&lt;/code&gt; to &lt;code&gt;1 degree&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rotate1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;animatedValue1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;inputRange&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;outputRange&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="s1"&gt;0deg&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="s1"&gt;1deg&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;Similarly for second circle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secondCircleColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate2&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;Note: &lt;code&gt;secondCircleColor&lt;/code&gt; is passiveColor (grey) in first case (&amp;lt;50) and activeColor (purple) in second case (&amp;gt;50).  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Its rotation value can be interpolated with &lt;code&gt;secondCircleAnimatedValue&lt;/code&gt; we initialized earlier.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rotate2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;secondCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;inputRange&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;outputRange&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="s1"&gt;0deg&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="s1"&gt;1deg&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;Our third color is grey (passiveColor) in both the cases and receives a rotation value. Also, in second case (&amp;gt;50), we are toggling &lt;code&gt;elavation&lt;/code&gt; value as described earlier. &lt;code&gt;renderHalf&lt;/code&gt; for this use case can be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;passiveColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate3&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;elevation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;elevation3&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;&lt;code&gt;rotate3&lt;/code&gt; and &lt;code&gt;elevation3&lt;/code&gt; values can be interpolated as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rotate3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;thirdCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;inputRange&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;outputRange&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="s1"&gt;0deg&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="s1"&gt;1deg&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;elevation3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;thirdCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;inputRange&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;outputRange&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="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&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;&lt;code&gt;Elevation toggle logic:&lt;/code&gt; the third circle is only rotating in the second case from left half to right half. As soon as it starts moving, it takes up some portion of the right half and that's exactly when we want to toggle elevation.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 4: Add animation to semicircles.
&lt;/h2&gt;

&lt;p&gt;Now we will write animation function for both cases. We want to start animating whenever we receive a new &lt;code&gt;percent&lt;/code&gt; value. We can use a simple &lt;code&gt;useEffect&lt;/code&gt; hook for this purpose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;firstAnimation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;//first case (&amp;lt;50)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;secondAnimation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//second case (&amp;gt;50)&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;Above function simply chooses the animation to execute based on value of &lt;code&gt;percent&lt;/code&gt;. Let's write our animation function for &lt;code&gt;first-case (&amp;lt;50)&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;firstAnimation&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;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secondCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;toValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;useNativeDriver&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;easing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Easing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;linear&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nx"&gt;start&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;&lt;code&gt;percent * 3.6&lt;/code&gt; is just to convert percentage to degrees. This function will animate second circle (grey) in clockwise direction to reveal first circle (purple) from behind. Now, let's see animation for our &lt;code&gt;second-case (&amp;gt;50)&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;secondAnimation&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;//resetting first circle to 0 degrees&lt;/span&gt;
    &lt;span class="nx"&gt;firstCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialValueHalfCircle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parallel&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
      &lt;span class="c1"&gt;//first circle will rotate upto 180 degrees for 50% of progress&lt;/span&gt;
      &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;toValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;useNativeDriver&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;easing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Easing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;linear&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="c1"&gt;//second circle is rotating along with first and some more to extra progress after 50%&lt;/span&gt;
      &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secondCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;toValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;useNativeDriver&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;easing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Easing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;linear&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="c1"&gt;//third circle is moving along with second in clockwise direction for that extra value after 50% progress&lt;/span&gt;
      &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;thirdCircleAnimatedValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;toValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;timePerDegree&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;percent&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;3.6&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="na"&gt;useNativeDriver&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;easing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Easing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;linear&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="nx"&gt;start&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;That's it, we are done with our animation. Let's add one inner circle to make this look like a progress bar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Render inner circle
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//styles for inner circle&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;innerCircleStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;baseColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;elevation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;flex&lt;/span&gt;&lt;span class="dl"&gt;'&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="s1"&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;alignItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&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="c1"&gt;//Complete view after adding the inner circle&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;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&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="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;percent&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;View&lt;/span&gt;
      &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&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;outerCircle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;borderRadius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;passiveColor&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;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstCircleColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate1&lt;/span&gt; &lt;span class="p"&gt;}])}&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secondCircleColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate2&lt;/span&gt; &lt;span class="p"&gt;}])}&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;renderHalf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;passiveColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;rotate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rotate3&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;elevation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;elevation3&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;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;innerCircleStyle&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;children&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;/View&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;/View&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;/View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And we are done! Click &lt;a href="https://github.com/iamshadmirza/react-native-design-system/blob/master/src/CircularProgressBar/CircularProgressBar.js"&gt;here&lt;/a&gt; to view source code used in this tutorial.&lt;br&gt;&lt;br&gt;
I hope you had fun learning animation with react native. Happy coding!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This component was created by &lt;a href="https://twitter.com/ankeetmaini"&gt;Ankeet Maini&lt;/a&gt;. For full repo with TypeScript, head over to: &lt;a href="https://github.com/ankeetmaini/rn-animation-circular-progress"&gt;https://github.com/ankeetmaini/rn-animation-circular-progress&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>reactnative</category>
      <category>animation</category>
      <category>mobiledev</category>
      <category>css</category>
    </item>
    <item>
      <title>Winning Hackathons feat. Aviral Aggarwal</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Fri, 22 Nov 2019 11:23:48 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/winning-hackathons-feat-aviral-aggarwal-17dp</link>
      <guid>https://forem.com/iamshadmirza/winning-hackathons-feat-aviral-aggarwal-17dp</guid>
      <description>&lt;p&gt;&lt;a href="https://teawithtanay.com/winning-hackathons-feat-aviral-aggarwal-episode-5/"&gt;Listen to Winning Hackathons feat. Aviral Aggarwal | Episode 5 from Podcast: teawithtanay.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;
In episode 5, &lt;a href="https://www.linkedin.com/in/aviral190694/"&gt;Aviral Aggarawal&lt;/a&gt;, iOS Developer at Microsoft joins Tanay to talk about how he got started with hackathons and why. Aviral calls himself a tech enthusiast who spends a lot of his time exploring tech, hackathons, and conferences. Tanay starts the conversation with his first question. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What's the story of your profile picture with Tim Cook?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral tells us that he has always been curious about Mac and wanted to get his hands on a Macbook in his office. He decided to learn iOS development and got a Macbook from his boss. He got to know about the Apple Worldwide Developers Conference (WWDC) and applied for free scholarship. Aviral started enrolling for WWDC in 2015 but got rejected for two consecutive years. Finally, he got selected to fly to the US in 2017 and luckily got a chance to meet Tim Cook. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;WWDC19 Scholarships reward talented students with the opportunity to attend Apple's annual Worldwide Developers Conference, and scholars also get a chance to meet Tim Cook.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Aviral talks about not getting selected three times out of his four attempts and how it helped him to grow in a person he is now. The takeaway is that &lt;em&gt;failures are also a part of the journey, and it nurtures you to grow in a better self&lt;/em&gt;. It takes us to the next question of this podcast.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How do you deal with failures?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral talks about various techniques that he uses to get himself motivated. &lt;br&gt;
He shares his goals with other people, it makes him accountable and creates a little pressure on him that he has to do what he said. &lt;br&gt;
The second thing he does is he involves his parents and close friends. They serve as a source of motivation when you start having self-doubts after failure. They know your worth more than you do and will always cheer you up when you're feeling down.&lt;br&gt;
The third piece of advice is to try a lot of stuff. Your chances of success increase with the number of involvement in multiple activities. If you succeed even in one out of ten things then this one success will help you overcome all the other failures.&lt;br&gt;
Aviral was applying for WWDC, Google Summer of Code, and few other events at the same time to improve his chances of getting selected which takes us to our next question.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How do you get to know about these events?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral tells us that networking played an important role here. You should connect with like-minded people. They are usually active in sharing which events they went to or are going to attend. &lt;br&gt;
Join groups like "&lt;a href="https://www.facebook.com/groups/759985267390294/"&gt;Hackathon Hackers&lt;/a&gt;" where you can get information about ongoing events. Aviral spends a lot of time in these groups that help him find relevant information.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Can you tell us about your Alexa journey?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral tells us about his mentor, who bought him an Alexa device and asked him if he can build a skill for his company. He emphasizes the importance of working on one technology instead of trying out many at once, He says as he has already spent a couple of years in iOS development, so it was a perfect time to try something new. Aviral started investing more time in Alexa and looked at it as one of his side projects, which he always loves to work.&lt;br&gt;&lt;br&gt;
After two months, he decided to go to a hackathon and build one skill onsite. It motivated him to build more skills and get a better understanding of how Alexa works.&lt;br&gt;&lt;br&gt;
He then went on to win goodies and prize money by building skills for Alexa.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What is your Hackathon winning recipe?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;When Aviral started going to hackathons four years ago, his main intention was to be there and meet people. He wanted to understand where does he stands and what he needs to learn to get better. If you're a beginner, you should &lt;em&gt;concentrate more on attending and understanding how hackathons work&lt;/em&gt;, Aviral says.&lt;br&gt;
It usually serves as a booster for your projects where you work rapidly for two days and iterate over the project later.&lt;br&gt;&lt;br&gt;
Aviral says that it's crucial to understand the purpose of the theme and why this hackathon is happening.  There are two types of hackathons in general:   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you are in a &lt;em&gt;"Presentation Hackathon"&lt;/em&gt; then you should concentrate more on communicating your idea and your presentation skills.
&lt;/li&gt;
&lt;li&gt;If you are in a &lt;em&gt;"Technology Hackathon"&lt;/em&gt; then what you've built matters more than how you present it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should apply to hackathons where you think your idea fits.&lt;br&gt;
Go with an idea planned in your mind and build the project there.&lt;br&gt;
Talk to people and get feedback on how you can make that idea better. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How to choose among the various student programs?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Apply in as many programs as you can and try to be in one. By applying, you will get an idea of how to submit applications to these programs and understand your weak points. It will enable you to compete on a global level.&lt;br&gt;
Some of the programs are listed below:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Student Partner&lt;/li&gt;
&lt;li&gt;Google Developer Expert&lt;/li&gt;
&lt;li&gt;Google Developer Student Group&lt;/li&gt;
&lt;li&gt;Google Summer of Code&lt;/li&gt;
&lt;li&gt;GirlScript Summer of Code&lt;/li&gt;
&lt;li&gt;Facebook Developer Circle&lt;/li&gt;
&lt;li&gt;Intel Software Ambassador Program&lt;/li&gt;
&lt;li&gt;Linkedin Writer Program &lt;/li&gt;
&lt;li&gt;Github Campus Ambassador Program&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How did your freelance work start?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Networking played a great role here. When you connect will lots of like-minded people, your chances of getting a good opportunity increases. Aviral got his freelancing gig when someone in his network approached him for help in a project. Freelancing polishes your skills and expands your knowledge base. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What's more important to focus during the hackathon?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral states some points to consider in this context:&lt;br&gt;
Focus on the product and examine if the design or tech is going to help in that particular hackathon.&lt;br&gt;&lt;br&gt;
A working prototype with one core feature is better than adding lots of features. So focus building one complete feature rather lots of addons.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How should a standard team look like?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;It depends on how many people you're comfortable with and you should team up with people who are also enthusiastic and interested in the event. &lt;strong&gt;&lt;em&gt;A team is as good as the people in it&lt;/em&gt;&lt;/strong&gt;.&lt;br&gt;
The end goal is to build something and be proud of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Are hackathons right for average coders?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Aviral says that you should first understand the purpose of a hackathon. &lt;em&gt;It is to bring like-minded people under one roof and encourage them to build something together.&lt;/em&gt; Attending these events and meeting people is more important than winning.&lt;br&gt;&lt;br&gt;
The people you network with may also be coming from the same position as you're in and sitting beside them will influence your life and motivate you to level up.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;"Don't let the fear of losing be greater than the excitement of winning." --Robert Kiyosaki&lt;/em&gt;
&lt;/h2&gt;

</description>
      <category>hackathon</category>
      <category>competitiveprogramming</category>
      <category>alexa</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Vue.js and Getting Started with Open Source ft. Rahul Kadyan</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Thu, 14 Nov 2019 14:07:00 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/vue-js-and-getting-started-with-open-source-ft-rahul-kadyan-2i5k</link>
      <guid>https://forem.com/iamshadmirza/vue-js-and-getting-started-with-open-source-ft-rahul-kadyan-2i5k</guid>
      <description>&lt;p&gt;Guest of this episode is &lt;a href="https://www.linkedin.com/in/rahulkadyan/"&gt;Rahul Kadyan&lt;/a&gt;, who is a senior software engineer at Myntra and a core contributor to Vue.js. He is also an organizer of &lt;a href="https://twitter.com/vueblr"&gt;VueBLR&lt;/a&gt; meetup and &lt;a href="https://twitter.com/AnAwesomeConf"&gt;AwesomeConf&lt;/a&gt; in Bangalore.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://teawithtanay.com/vue-js-and-getting-started-with-open-source-ft-rahul-kadyan-episode-4/"&gt;Listen to Vue.js and Getting Started with Open Source ft. Rahul Kadyan | Episode 4 from Podcast: teawithtanay.com&lt;/a&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Tanay starts the podcast with a little introduction of Vue&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Vue is a progressive framework as it progresses with the scale of your application. It is adaptable, easy to pick up, integrate with other libraries or existing projects. It provides a view layer for building reactive applications. Vue’s gentle learning curve steals the hearts of beginners and advanced developers, making it more and more popular with time.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Why is Vue big in China?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Vue originated in China. Since, the creator of Vue.js is Evan You, from China, Chinese tend to give more priority to their product rather than other frameworks backed up by tech giants like Google and Facebook. This makes Vue.js trending in the Chinese Market.&lt;br&gt;&lt;br&gt;
Another reason could be the documentation in the Chinese language. It is written well and said to be the best among all the frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How did you start with Open Source?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rahul tells that the Google Summer of Code program served as a stepping stone into the world of Open Source. It's a platform where students contribute to open-source projects and get paid. &lt;br&gt;
During that time at the GSOC program, Rahul worked on several projects on different technology.&lt;br&gt;&lt;br&gt;
The strategy Rahul suggests is to check the error you are getting and try to debug around it. It enabled him to read code and learn from it.&lt;br&gt;&lt;br&gt;
Earlier Rahul used to raise the issue if he finds something broken, then he started fixing it himself and sending PRs. The essential takeaway is to &lt;em&gt;fix the things which you are using.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Why you should contribute to Open Source?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rahul sees open source as learning opportunities. You get to see different problems every day which could help you with your project as well. Reading code by other developers provides a different perspective to look at a problem. Their approach to solving an issue broadens your knowledge immensely.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How do you read code in a project?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Open Source projects can be too overwhelming with too much information and it gets confusing sometimes to find a starting point. Rahul talks about two basic strategies that he follows:&lt;br&gt;
Search for the error string you are getting and try to understand the code around it. If you are working with a tool, it's best suited to start solving errors you are facing.&lt;br&gt;
The second approach could be finding the entry point of the program. Think like an interpreter, go line by line as the program is likely to run. This approach is helpful if you are exploring any project.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Does one need in-depth knowledge to contribute to a project?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rahul says that there is no limit to depth. The idea is to contribute to projects which you are learning currently. You should have a basic understanding of the syntax and you are good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How to select an open-source project?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;You can use the GitHub search tool to search for labels such as beginners, good first issue, hacktoberfest, etc.&lt;br&gt;&lt;br&gt;
&lt;a href="https://hacktoberfest.digitalocean.com/"&gt;Hacktoberfest&lt;/a&gt; is a month-long celebration where you can get goodies for contributing to open-source. During October month, hundreds of projects get tagged with "hacktoberfest" label as beginner-friendly issues, this can be a good entry point.&lt;br&gt;&lt;br&gt;
If you are stuck somewhere, you can discuss your problem with the comment thread GitHub provides on issues.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;em&gt;In open-source, we feel strongly that to really do something well, you have to get a lot of people involved. -Linus Torvalds&lt;/em&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://teawithtanay.com"&gt;https://teawithtanay.com&lt;/a&gt; on September 26, 2019.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>vue</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Creating community and scaling it too ft Anubha Maneshwar</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Wed, 13 Nov 2019 13:04:26 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/creating-community-and-scaling-it-too-ft-anubha-maneshwar-2o72</link>
      <guid>https://forem.com/iamshadmirza/creating-community-and-scaling-it-too-ft-anubha-maneshwar-2o72</guid>
      <description>&lt;p&gt;In episode 3, &lt;a href="https://www.linkedin.com/in/anubhamane/"&gt;Anubha Maneshwar&lt;/a&gt;, founder of GirlScript project which helps beginners get started with coding, joins Tanay to share her journey of building a community and growing it. In the episode, she talks about how she got started and how she got people excited about her vision for GirlScript.&lt;br&gt;&lt;br&gt;
&lt;a href="https://teawithtanay.com/creating-a-community-and-scaling-it-too-ft-anubha-maneshwar-episode-3/"&gt;Listen to Creating a community and scaling it too ft. Anubha Maneshwar | Episode 3 from Podcast: teawithtanay.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Anubha Maneshwar is the founder of GirlScript, Mozilla Web Group, Dev Rally in Hasura, and has won the Indian Women Leadership Award for Education. Anubha Maneshwar is the winner of 35 Under 35 Awards in Best Startup for Education Category and India’s Top 100 Young Leaders Award.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Anubha and GirlScript&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;GirlScript right now is in 52 cities of India, in Chicago, China, Africa, and it's about to come to the UK in two years.&lt;br&gt;
GirlScript aims to help beginners learn and get suitable exposure.&lt;br&gt;
Anubha's journey starts from a small college in Nagpur and goes all the way to Google Women Tech Makers in Hyderabad.&lt;br&gt;&lt;br&gt;
She got a chance to attend Google Tech Maker International women's day celebration which made her realize how far the community is lagging. It then led her to become a part of the Mozilla Web Community along with a few other communities as well. After being a part of more than 10 communities she realized that there is a gap she can fill and that's how GirlScript came into existence.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How did you come up with the name GirlScript ?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha talks about an event when she with her classmates were interviewing for a company. When it came to the programming round, others started to step back. That's where she realized that women in tech are taking a set back themselves and they need support.&lt;br&gt;&lt;br&gt;
GirlScript is an organization that provides the needed support to both men and women promoting diversity, equality in tech and therefore the name. To promote equality, 50% of seats are reserved for women bringing an equal ratio of men and women under one roof. Anubha says that a community can't be built by excluding a group or do women-only events.&lt;br&gt;&lt;br&gt;
The idea of "Script" in GirlScript is to write something meaningful as it does by including both men and women in community events and empowering women as well.&lt;br&gt;&lt;br&gt;
The other moto of GirlScript is to support feminism. If a guy doesn't feel bothered working under a women leader and for the name "GirlScript" then that will be the true meaning of feminism and women empowerment, Anubha added.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How did you start this community?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha says that she started with the Mozilla Web Community before starting GirlScript. She added few friends into the Mozilla community and kept building the network.&lt;br&gt;&lt;br&gt;
After two years she decided to start a community and shared her ideology with fellow mates at Mozilla who later joined to organize the first WordPress workshop by GirlScript in Nagpur.&lt;br&gt;&lt;br&gt;
Anubha talks about the importance of a good network and how it helped her at a place where social media and tools like &lt;a href="https://www.meetup.com"&gt;meetup.com&lt;/a&gt; were not that popular. After a couple of events, people started contacting her themselves and the community grew as we see it now.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Why did you feel the need for a new community when communities like Mozilla Web Group and Google Tech Maker were already there?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha talks about the gap that she wanted to fill after working with communities like Mozilla and Google.&lt;br&gt;&lt;br&gt;
She says that although these communities are doing well, the problem was less presence in small cities.&lt;br&gt;&lt;br&gt;
The second thing she mentions was the application process. Students are not confident enough to fill the forms and the eligibility criteria are very high. The application process itself is not beginner-friendly.&lt;br&gt;&lt;br&gt;
The third thing was regularity in tech education. A person should get a job if he/she is a part of GirlScript. For example, if you're starting with JavaScript then you study javascript for 6 weeks straight and finish it to the end.&lt;br&gt;&lt;br&gt;
Opportunities for everyone, making sure everyone gets a chance when it comes to getting a scholarship or giving a talk abroad.&lt;br&gt;
There were basic things that were missing apart from programming like email writing, etc. GirlScript works in providing an all-round education.&lt;br&gt;&lt;br&gt;
GirlScript was the first organization to tackle these gaps and start a tech revolution in India which is why the community grew up so fast in so less amount of time.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How do you organize everything and tackle the problems at a scale so big ?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha says that people from small cities don't use or know about apps like Discord or Slack but one thing commonly used by everyone is WhatsApp and that's our main way of communication.&lt;br&gt;
GirlScript uses WhatsApp group for leaders which provides them the information for various chapters and to discuss the problems if they are facing any. These leaders are allowed to use any platform available as suited by the place and members of the event.&lt;br&gt;&lt;br&gt;
It also breaks the stereotype of &lt;em&gt;coolness&lt;/em&gt; in the tech world who use slack, meetup.com or other tools that are less common for beginners. The idea is to utilize where most of the presence is.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;GirlScript and Summer of Code Internships (GSSOC)&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;GirlScript includes individual projects as well as projects from NGOs. Anubha says that organizations like these usually struggle to get their website running in limited funds. By including them, students get to contribute to them as well. This helps in solving the tech problems of non-tech communities.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;How the agenda of any event or topics to be taught are decided ?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha tells us that the syllabus is not restricted to a particular tech. Chapter leaders usually take a survey to know what do the students in that region want to learn and this changes from time to time. It can be python sessions at one time and JavaScript at another. The curriculum is flexible to the requirements of students and their caliber.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What is your approach for sponsorship ?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;The most important thing is transparency. If you manage to showcase that the money invested is being utilized in a good way then companies will be happy to sponsor your cause. Anubha tells us that the companies want to know the use and impact you are making if they are putting their money.&lt;br&gt;&lt;br&gt;
GirlScript also has only two fundraising events in which they charge. Apart from that, everything is free of cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What is your appeal to our listeners?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Anubha gives a nice message that "if you see a fellow mate lagging for some reason then you should always try to help." The second thing she mentions is that you can always ask for help if you feel like you're lagging. GirlScript is there to help you and you can reach out to Anubha or GirlScript in case you need any help.&lt;br&gt;&lt;br&gt;
Anubha advises the listener to go to events, interact with other people and learn new things. You should focus on learning mainly and not on materialistic swags, t-shirts, etc.   &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;On ending note, one should always remember that &lt;strong&gt;&lt;em&gt;Community means giving back.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>community</category>
      <category>podcast</category>
      <category>girlscript</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Strategy around Hobby Projects ft. Rachit Gulati | Episode 2</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Wed, 16 Oct 2019 11:07:55 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/strategy-around-hobby-projects-ft-rachit-gulati-episode-2-1fcg</link>
      <guid>https://forem.com/iamshadmirza/strategy-around-hobby-projects-ft-rachit-gulati-episode-2-1fcg</guid>
      <description>&lt;p&gt;&lt;a href="https://teawithtanay.com/hobby-projects-ft-rachit-gulati-episode-2/"&gt;Listen to Hobby Projects ft. Rachit Gulati | Episode 2 from Podcast: teawithtanay.com&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;In episode 2, &lt;a href="https://www.linkedin.com/in/rachitgulati26/"&gt;Rachit Gulati&lt;/a&gt; from Microsoft joins Tanay to talk about how he got started with hobby projects and how they helped him in cracking interviews. Rachit goes on to explain how one can go about doing hobby projects and benefit from them.&lt;br&gt;
Rachit says that he has a lot of problems that motivate him to work on side projects. He likes going on treks or hanging out with friends when he is not coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;"Tanay starts the conversation by Rachit's interview experience at Microsoft and how doing hobby projects landed him a job"&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rachit tells us about the time when he was interviewing for Microsoft and one of the rounds didn't go well. But Microsoft decided to give him another chance because of the side projects he has made. This shows how hobby projects enhance the credibility of your profile and provide you a cutting edge in technical interviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;"Can you tell about your project where you have around 3 lakh students using your product?"&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rachit tells us about his first hobby project, an android application which he made using Eclipse. People were wondering how one can make an app on a notebook with 2GB of RAM and an Intel Atom processor? &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I guess things become possible when you're determined to do it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Rachit's application helps in revising concepts before an interview by providing a list of questions categorized by topics such as database, algorithms or basic computer programming. &lt;em&gt;"The UI of the app is not good but the idea here to complete the project and it should serve a purpose. When you have an idea and you build something, you learn a lot not just on the idea but around the idea too."&lt;/em&gt;, Rachit added.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;"What would you advise to someone who does not have an idea and wants to build something?"&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rachit talks about multiple ways to get started on projects whether you know programming or not. These are as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first attempt can be going out and explore. Be vulnerable, get out of your comfort zone and explore the possibilities.
Decide if you want to collaborate on something or build something yourself.
&lt;/li&gt;
&lt;li&gt;If you want to collaborate, you can go to GitHub and search for trending projects that have been launched recently. People are usually looking for active collaborators and that's an opportunity.&lt;/li&gt;
&lt;li&gt;You can also search for flags like "myfirstissue" or "beginners" on GitHub for first-time comers.
&lt;/li&gt;
&lt;li&gt;If you don't know programming then you can contact people and tell them you are interested to work on that project. There are other ways to collaborate like writing documentation, designing the landing page, etc. 
&amp;gt;The key takeaway here is to &lt;em&gt;Not plan too much and start executing from the very first day&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Everybody has problems that need solving.&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rachit wanted to highlight key points on web pages which enabled him to make a highlighter chrome extension. There were other tools but not exactly what Rachit wanted. The problem that Rachit had was common to many people and this made his product the &lt;em&gt;trending product of the day&lt;/em&gt; on &lt;a href="https://www.producthunt.com/"&gt;Product Hunt&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;I have an idea, I know some programming but I can't make a full-stack app. What should be the approach here?&lt;/em&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Draft down the basic version of that idea. Simplify it to its minimum and write about it in simple words. &lt;/li&gt;
&lt;li&gt;Draw it on paper and examine how it will look. &lt;/li&gt;
&lt;li&gt;Choose a tech stack that you either want to learn or you're familiar with then start building just the core functionality only.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three things that any product need is:-  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Feedback form: Know the pros and cons of your product.&lt;/li&gt;
&lt;li&gt;Feature request: Know what the user really wants.&lt;/li&gt;
&lt;li&gt;Analytics: Know your users better and try to optimize for better user experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Tanay adds not to dive into coding at day 1 but first do the research and bake your idea well then make it. And we got our first quote fro the talk- &lt;em&gt;"Bake it then Make it".&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;What do you think about discovery? When and how to launch a product?&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Rachit describes why the time and day of launching an idea is crucial. When you have invested hours on a product, it becomes really important that it reaches as many people as possible.&lt;br&gt;
The key takeaways are: -  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launching a product on a day when there are chances of people being busy is not a good idea. Weekends are supposed to be spent with family or friend so should avoid launching on weekends.
Monday is also not a good fit as people just came after a weekend and there is a lot to catch up. Anything between Tuesday to Thursday is a good choice.&lt;/li&gt;
&lt;li&gt;Now, optimize the time based on your market and timezone.
Try to reach a lot of people. Launch on multiple sites, reach out to people and ask for feedback.&lt;/li&gt;
&lt;li&gt;The first version will be the basic features just to learn about the idea and the market. Then you can gather the feedback and start working on the next version to monetize the product and earn from it.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The first version is to Learn, the second version is to Earn"&lt;/em&gt;. This marks the second quote from this talk.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://teawithtanay.com/hobby-projects-ft-rachit-gulati-episode-2/"&gt;https://teawithtanay.com&lt;/a&gt; on September 12, 2019.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>community</category>
      <category>podcast</category>
      <category>books</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How books shape our life ft. Priyadeep Sinha | Episode 1</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Tue, 15 Oct 2019 09:15:26 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/how-books-shape-our-life-ft-priyadeep-sinha-episode-1-13do</link>
      <guid>https://forem.com/iamshadmirza/how-books-shape-our-life-ft-priyadeep-sinha-episode-1-13do</guid>
      <description>&lt;p&gt;&lt;a href="https://teawithtanay.com/how-books-shape-our-life-ft-priyadeep-sinha-episode-1/"&gt;Listen to How books shape our life ft. Priyadeep Sinha | Episode 1 from Podcast: teawithtanay.com&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;In episode 1 &lt;a href="https://www.linkedin.com/in/priyadeep-sinha/"&gt;Priyadeep Sinha&lt;/a&gt;, Director at Global Alliance for Mass Entrepreneurship (GAME) joins &lt;a href="https://twitter.com/tanaypratap"&gt;Tanay&lt;/a&gt; to talk about how books can guide as well as provide transformative experiences.&lt;/p&gt;

&lt;p&gt;The show begins with Tanay explaining why he has chosen Teacher’s day (5th September) as the day of the launch of his podcast as well as the topic of books for the first episode.&lt;/p&gt;

&lt;p&gt;He follows by introducing Priyadeep Sinha as the most well-read person he knows and how Priyadeep has inspired a generation of entrepreneurs in Manipal.&lt;/p&gt;

&lt;p&gt;Priyadeep introduces himself and what he is currently involved with. He then shares an exciting story of how he picked up the love for books. In the show, Priyadeep touches upon his favorite books and the main lessons he drew from each one of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;"Tanay starts the conversation by asking Priyadeep's favorite book."&lt;/em&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  1. The GodFather by Mario Puzo
&lt;/h2&gt;

&lt;p&gt;Priyadeep describes "The GodFather" as his favorite book of all time. The Godfather is a crime novel written by American author Mario Puzo, detailing the story of a fictional Mafia family based in New York City (and Long Beach, New York), headed by Vito Corleone. The epigraph for The Godfather is, "Behind every great fortune there is a crime. - Balzac." Priyadeep talks about how Vito Corleone, who is actually a mafia ended up doing more good for the society as he took a stand against someone who wanted to bring drugs into his city and denied to let him spoil the city. What really struck Priyadeep with this story is how someone even after being from a mafia background helped people and society. It serves as a purpose of motivation to "try and do more for people."  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;"What's your favorite books on Startup?", Tanay continues the conversation.&lt;/em&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  2. Delivering Happiness by Tony Hsieh
&lt;/h2&gt;

&lt;p&gt;The central theme of the book is the business of literally delivering happiness while living a life of passion and purpose. Delivering Happiness (2013) tells the story of Tony Hsieh and his company Zappos, demonstrating how thinking long-term and following your passions can not only lead to profits but also a happy life for your employees, your customers, and yourself. The book describes an alternative approach to the corporate culture that focuses on the simple concept of making people around you happy, and by doing so increase your own happiness. "Delivering happiness describes how Zappos built a complete customer-centric organization and that stayed strongly with me" - Priyadeep said.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Hard things about Hard things by Ben Horowitz
&lt;/h2&gt;

&lt;p&gt;The Hard Thing About Hard Things is an inside look at the tough decisions and lonely times all CEOs face, before showing you what it takes to build a great organization and become a world-class leader. Priyadeep tells us how as a startup founder, he went through a lot of hardships and this book stayed as a ray of motivation and confidence in all those times. This book talks about how Ben Horowitz survived through all the hard times. It states that the startup CEOs are "Wartime CEOs" and they have to be focused all the time. It also states how you can't put all the burden on your shoulders alone, and you have to learn to share the burden with more brains to successfully run a company. Few more important lesson that Priyadeep describes how the book describes that "What happens inside you when you're about to sell your company?" and "A good CEO always know when to layoff people and how to talk to them?" which PD himself have experienced in his life earlier.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;"What books would you recommend to someone who wants to start a startup?"&lt;/em&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  4. Hooked by Nir Eyal
&lt;/h2&gt;

&lt;p&gt;Hooked describes how to build a habit-forming product that people want to use. A habit-forming product is a winning product, and the ultimate goal of habit-forming products is to solve a customer's problem (pain) by creating an association, so the customer sees the product as relief or a solution. The book talks about how extrinsic motivation leads you to seek a reward from a product and then extends that reward further. This forms an intrinsic motivation and this spiral continues. "Every product that has scaled to extremely large numbers has been able to do that and create a rewarding experience,'' Priyadeep added.&lt;br&gt;
"Not all entrepreneurs come with a large amount of Intrinsic Motivation, there is some of it but it needs an unlocking mechanism and you need and Extrinsic Motivation to do that." - Priyadeep said. These two books are great in these terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Steve Jobs by Walter Isaacson
&lt;/h2&gt;

&lt;p&gt;Steve Jobs is the most detailed and accurate account of the life of the man who created Apple, the most valuable technology company in the world. The skill that allowed Steve Jobs to create this huge vision for Apple out of nothing was not his obsession for detail, nor his sense of design, simplicity, or aesthetics. Priyadeep talks about that Steve Jobs had a tendency to observe humans really well which enabled him to build an extremely human-friendly product like iPhone and iPad.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Elon Musk by Ashley Vance
&lt;/h2&gt;

&lt;p&gt;Elon Musk is the first official biography of the creator of SolarCity, SpaceX, and Tesla, based on over 30 hours of conversation time between author Ashlee Vance and Musk himself, highlighting his complicated childhood, the way he makes decisions and navigates the world, and how he managed to disrupt multiple industries, all with the goal of saving humanity.&lt;br&gt;&lt;br&gt;
Elon Musk is a truly fascinating character. "Elon Musk got bullied as a child and he would take refuge in reading books" is one of the parts that I deeply relate to, Priyadeep said. An important advise Priyadeep gave is to "Take the good elements of the persona and not to romanticize everything". There is always an insight into the vision of the person which is worth observing.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. The $100 Startup by Chris Guillebeau
&lt;/h2&gt;

&lt;p&gt;The $100 Startup shows you how to break free from the shackles of 9 to 5 by combining your passion and skills into your own microbusiness, which you can start for $100 or less, yet still turn into a full-time income, thanks to the power of the internet. Chris pulled out a step-by-step framework you can use to find where your passion meets your skills and turn those into an income from your couch. Using nothing but a laptop and some wifi in most cases, you can build a thriving software, freelance or education business and scale it as far as you want. "It's short, quick and really good to read while you're starting up," Priyadeep said.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Factfulness by Hans Rosling
&lt;/h2&gt;

&lt;p&gt;Factfulness explains how our worldview has been distorted with the rise of new media, in which ten human instincts cause erroneous thinking, and how we can learn to separate fact from fiction when forming our opinions. Priyadeep describes how this book enables you to see the reality overshadowed by the fiction which is created by the media advertising and modern internet era and "You should not romanticize the problem and think that you're a hero trying to save the world but you are working towards making incremental gains to make this world a better place."&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;"What books would you like to suggest which will help you with anyone who reads and improve as a person? Tanay continues the conversation with his next question"&lt;/em&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  9. Twenty Thousand Leagues Under the Sea by Jules Verne
&lt;/h2&gt;

&lt;p&gt;Priyadeep says that storybooks contain a lot of really good messages that you can take. It focuses on a group of scientists embarking on a dangerous voyage in a submarine piloted by the eccentric Captain Nemo in search of a giant monster. As the journey wore on, the crew encounters dangerous life forms, but the biggest threat to their safety may be their increasingly mad captain. Considered one of the greatest science-fiction novels ever written, Twenty Thousand Leagues Under the Sea explores themes of culture, class, grief, and the preservation of the environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Journey to the center of the earth by Jules Verne
&lt;/h2&gt;

&lt;p&gt;Journey to the Center of the Earth tells the story of three adventurers who undertake a perilous and ill-advised expedition to the center of the earth. On the way, the men encounter prehistoric "marine monsters" and brave the volatile conditions under the earth's surface. The theme of the book is perseverance, continuing on the journey despite hardships, despite doubt, despite even reason. Jules Verne has done a tremendous job of showing us what human beings are capable of which in turn serves as a source of motivation.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. I, Robot by Isaac Asimov
&lt;/h2&gt;

&lt;p&gt;In I, Robot, Asimov chronicles the development of the robot through a series of interlinked stories: from its primitive origins in the present to its ultimate perfection in the not-so-distant future--a future in which humanity itself may be rendered obsolete. Here are stories of robots gone mad, of mind-read robots, and robots with a sense of humor. Of robot politicians and robots who secretly run the world--all told with the dramatic blend of science fact and science fiction that has become Asimov's trademark.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. Murder in Mesopotamia by Agartha Cristie
&lt;/h2&gt;

&lt;p&gt;Murder in Mesopotamia is a work of detective fiction by British writer Agatha Christie. The story revolves around someone who is mysteriously murdered. There are several possible suspects. Hercule Poirot who is a great detective figure out who the murderer is. The best part about this book is that it is unpredictable, sparking the reader’s curiosity, and you can not guess who is actually guilty.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. Lord of the Rings by J.R.R. Tolkien
&lt;/h2&gt;

&lt;p&gt;The Lord of the Rings by J.R.R. Tolkien tells the story of the War of the Ring in the fictional world of Middle-earth. The long novel, commonly published as three volumes and mistakenly called a trilogy, centers around the magical One Ring, which was discovered by Bilbo Baggins in the earlier novel The Hobbit. Now, the free peoples of Middle-earth, such as Men, Elves, Dwarves, and Hobbits, must overcome the dark power of Sauron by destroying the Ring. As Priyadeep said, fiction stories teach us important life lessons. This book teaches the importance of “Unity, Persistence, Purposeful Life, Counting your Blessings, Watching before Saying, and Loyalty.” &lt;/p&gt;

&lt;p&gt;So these were the books that will help you grow as a person, teach you about life, and aspire you towards success. Go on, grab one and start reading!! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“A great book should leave you with many experiences, and slightly exhausted at the end. You live several lives while reading.”&lt;br&gt;
― William Styron&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Priyadeep’s Recommended Books
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; The Godfather [&lt;a href="https://amzn.to/2ZuRaCb"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Delivering Happiness [&lt;a href="https://www.amazon.in/Delivering-Happiness-Tony-Hsieh/dp/145550890X/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;amp;qid=1567678426&amp;amp;sr=8-1"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Hard Thing about Hard Thing [&lt;a href="https://amzn.to/2POom34"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Hooked [&lt;a href="https://amzn.to/34pH4kL"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The $100 Startup [&lt;a href="https://amzn.to/34pH4kL"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Factfulness [&lt;a href="https://amzn.to/34l4SWZ"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; 20,000 Leagues Under the Sea [&lt;a href="https://www.amazon.in/Journey-Centre-Earth-Jules-Verne/dp/8176936227/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;amp;qid=1567679970&amp;amp;sr=8-5"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Journey to the Centre of the Earth [&lt;a href="https://amzn.to/2LlGxJ7"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; I, Robot [&lt;a href="https://amzn.to/2LlGxJ7"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Murder in Mesopotamia [&lt;a href="https://amzn.to/2LnsUZG"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Firm [&lt;a href="https://amzn.to/2NS4ppa"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Pelican Brief [&lt;a href="https://amzn.to/2ZTwAXv"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Hobbit and the Lord of the Rings [&lt;a href="https://amzn.to/2LueDcC"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Count of Monte Cristo [&lt;a href="https://www.amazon.in/Count-Monte-Cristo-Alexandre-Dumas/dp/8193387627/ref=tmm_pap_swatch_0?_encoding=UTF8&amp;amp;qid=1567680414&amp;amp;sr=8-3"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can never read enough books so here are some more books for startup enthusiasts that you will help you in your journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Editor’s Picks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; The Startup Owner’s Manual [&lt;a href="https://amzn.to/2Lqj2NF"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; The Lean Startup [&lt;a href="https://amzn.to/2ZyrnJl"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Elon Musk [&lt;a href="https://amzn.to/2LvKtpD"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Blue Ocean Strategy [&lt;a href="https://www.amazon.in/Blue-Ocean-Strategy-Uncontested-Competition/dp/1625274491/ref=tmm_hrd_swatch_0?_encoding=UTF8&amp;amp;qid=&amp;amp;sr="&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Business Model Generation [&lt;a href="https://amzn.to/34l678B"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Zero to One [&lt;a href="https://amzn.to/34sbSBt"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;li&gt; Start With Why [&lt;a href="https://amzn.to/2ZBVU92"&gt;Buy Paperback&lt;/a&gt;]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://teawithtanay.com"&gt;https://teawithtanay.com&lt;/a&gt; on September 5, 2019.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>community</category>
      <category>podcast</category>
      <category>books</category>
      <category>javascript</category>
    </item>
    <item>
      <title>React Native Reward Referrals</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Thu, 22 Aug 2019 02:13:05 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/react-native-reward-referrals-17da</link>
      <guid>https://forem.com/iamshadmirza/react-native-reward-referrals-17da</guid>
      <description>&lt;p&gt;This is the third article of series &lt;a href="https://iamshadmirza.hashnode.dev/react-native-deep-linking-simplified-cjzj6qf8900003ss1zv178dm9"&gt;&lt;em&gt;React Native Deep Linking Simplified&lt;/em&gt;&lt;/a&gt; and in the first two blogs, we learned how to add Deep Link in our app and how to handle it gracefully.&lt;br&gt;&lt;br&gt;
In this article, we will set up a referral system and get the most out of this amazing feature. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Offering in-app rewards for successful referrals to both the referrer and the recipient is an effective way to encourage users to use your app. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are five simple steps that we will be going through. Let's get started.&lt;/p&gt;
&lt;h2&gt;
  
  
  Steps involved:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Setup Firebase Project and SDK&lt;/li&gt;
&lt;li&gt;Create an invitation link&lt;/li&gt;
&lt;li&gt;Send the invitation link&lt;/li&gt;
&lt;li&gt;Retrieve the link&lt;/li&gt;
&lt;li&gt;Grant reward&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 1. Setup Firebase Project and SDK
&lt;/h2&gt;

&lt;p&gt;We have already covered this section in &lt;a href="https://iamshadmirza.hashnode.dev/react-native-deep-linking-simplified-cjzj6qf8900003ss1zv178dm9"&gt;Part 1&lt;/a&gt; and &lt;a href="https://iamshadmirza.hashnode.dev/handling-incoming-dynamic-links-cjzkouqgq002nzts1xvo1pz11"&gt;Part 2&lt;/a&gt; of this series. Please go through them first then continue from Step 2. &lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2. Create invitation link
&lt;/h2&gt;

&lt;p&gt;We already learned how to create Dynamic Link from Firebase Console. This time, we will be generating the &lt;em&gt;invitation link&lt;/em&gt; at the sender's end and attach a &lt;code&gt;payload&lt;/code&gt; along with it. This &lt;code&gt;payload&lt;/code&gt; will specify the sender's user account ID at the receiving end. It will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.deeplinkdemo.com?invitedby=SENDER_UID
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I will be using a random SENDER_UID just for this article. You can call &lt;code&gt;getUid()&lt;/code&gt; on Firebase user or generate the ID as you like.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;//import firebase&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;firebase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-firebase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//Generate unique user ID here&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SENDER_UID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;USER1234&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//build the link&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="s2"&gt;`https://www.deeplinkdemo.com?invitedBy=&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;SENDER_UID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;dynamicLinkDomain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://deeplinkblogdemo.page.link&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//call  DynamicLink constructor&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DynamicLink&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;links&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;DynamicLink&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;dynamicLinkDomain&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;//get the generatedLink&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;generatedLink&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;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;links&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;createDynamicLink&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;DynamicLink&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;created link&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;generatedLink&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// console.log: https://deeplinkblogdemo.page.link?link=https%3A%2F%2Fwww.deeplinkdemo.com%3FinvitedBy%3DUSER1234&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3. Send the invitation link
&lt;/h2&gt;

&lt;p&gt;Now that we have created the link, we can include it in an invitation. This invitation can be an email, SMS message, or any other medium, depending on what is most appropriate for your app and audience. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;INVITATION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Shad has invited you to try this app. Use this referral link: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;link&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//send this String as you link&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4. Retrieve the link
&lt;/h2&gt;

&lt;p&gt;There are many use cases that can happen when the recipient opens the app with the invitation link:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the app isn't already installed, they will be directed to Play Store or App Store to install the app.&lt;/li&gt;
&lt;li&gt;If the app is installed, they will open our app for the first time and we can retrieve the referral information included in the Dynamic Link.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember when we added &lt;code&gt;SENDER_UID&lt;/code&gt; as a payload in our invitation link? We are going to retrieve that info to specify the user and grant reward. We want to check that the app has been launched from a Dynamic Link or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;    &lt;span class="c1"&gt;//add the code to the root file of your app&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;url&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;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;links&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getInitialLink&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;incoming url&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//incoming url https://www.deeplinkdemo.com?invitedby=USER1234&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;url&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;ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getParameterFromUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;invitedBy&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ID&lt;/span&gt;&lt;span class="dl"&gt;'&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;//ID USER1234&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;getParameterFromUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;parm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;re&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.*[?&amp;amp;]&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;parm&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;=([^&amp;amp;]+)(&amp;amp;|$)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;re&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="nx"&gt;match&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;match&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="p"&gt;:&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;blockquote&gt;
&lt;p&gt;&lt;code&gt;getInitialLink()&lt;/code&gt; returns the Dynamic Link that the app has been launched from. If the app was not launched from a Dynamic Link the value will be null.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 5. Grant reward
&lt;/h2&gt;

&lt;p&gt;Now that we have retrieved the payload data from the Dynamic Link, we can specify the user who shared the link and grant the referral rewards to the referrer and the recipient whenever the criteria we want to require have been met. And by this our &lt;em&gt;Reward Referral System&lt;/em&gt; has been completed. Cheers!!  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3NtY188QaxDdC/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3NtY188QaxDdC/giphy.gif" alt="'cheers'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you had fun learning about the Dynamic Links, Handling them and the Reward Referral systems in these three blog post series. Find it helpful? Please do share.&lt;br&gt;&lt;br&gt;
Shad&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>beginners</category>
      <category>firebase</category>
    </item>
    <item>
      <title>Handling Incoming Dynamic Links</title>
      <dc:creator>Shad Mirza</dc:creator>
      <pubDate>Wed, 21 Aug 2019 03:31:27 +0000</pubDate>
      <link>https://forem.com/iamshadmirza/handling-incoming-dynamic-links-1gge</link>
      <guid>https://forem.com/iamshadmirza/handling-incoming-dynamic-links-1gge</guid>
      <description>&lt;p&gt;This is Part 2 of the series React Native Deep Linking Simplified and in &lt;a href="https://iamshadmirza.hashnode.dev/react-native-deep-linking-simplified-cjzj6qf8900003ss1zv178dm9"&gt;Part 1&lt;/a&gt; we learned &lt;em&gt;How to add Deep Links&lt;/em&gt;.&lt;br&gt;&lt;br&gt;
In this article, our goal is to learn how to handle incoming links like a pro.&lt;br&gt;&lt;br&gt;
We will also see how to route the user to a particular screen based on the incoming link.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The term &lt;strong&gt;Deep Link&lt;/strong&gt; is used for the &lt;code&gt;https&lt;/code&gt; scheme and &lt;strong&gt;Dynamic Link&lt;/strong&gt; is used for the &lt;code&gt;app&lt;/code&gt; scheme. We can use both to navigate our user so don't get confused between these two terms.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's get started.&lt;/p&gt;
&lt;h1&gt;
  
  
  Table of Content
&lt;/h1&gt;

&lt;p&gt;This article is divided into two main sections. We will go through these as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Project Setup&lt;/li&gt;
&lt;li&gt;Test Dynamic Link on the device&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;
  
  
  Project Setup
&lt;/h1&gt;

&lt;p&gt;We will use the &lt;code&gt;react-native-firebase&lt;/code&gt; module to configure Dynamic Links in our React Native Project. It involves 4 simple steps:&lt;/p&gt;
&lt;h3&gt;
  
  
  Steps involved:-
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a React Native project&lt;/li&gt;
&lt;li&gt;Create an application on firebase console&lt;/li&gt;
&lt;li&gt;Add react-native-firebase &lt;/li&gt;
&lt;li&gt;Add Firebase Dynamic Link module&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 1. Create a React Native Project
&lt;/h2&gt;

&lt;p&gt;Follow the steps in &lt;a href="https://iamshadmirza.hashnode.dev/react-native-deep-linking-simplified-cjzj6qf8900003ss1zv178dm9"&gt;Part 1&lt;/a&gt; of this series and add Deep Link as described. We will be adding &lt;code&gt;firebase-invites&lt;/code&gt; support via the same Dynamic/Deep Link we created earlier.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2. Create an application on firebase console
&lt;/h2&gt;

&lt;p&gt;Let's create an application on the firebase console to use the Firebase SDK. Follow this &lt;a href="https://console.firebase.google.com/"&gt;link&lt;/a&gt; and create an application. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a project by clicking on &lt;strong&gt;Add Project&lt;/strong&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the steps to add Android/iOS app. Make sure the project name in &lt;strong&gt;Register app&lt;/strong&gt; section matches with your react-native project (&lt;code&gt;com.deeplinkdemo&lt;/code&gt; in our case). &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---5WJZxYI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/create-application.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---5WJZxYI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/create-application.png" alt="'Register App'"&gt;&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download &lt;code&gt;google-services.json&lt;/code&gt; and paste it inside &lt;code&gt;/deeplinkdemo/android/app/&lt;/code&gt;. Make sure the location is correct.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L0Czz4S1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L0Czz4S1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/image.png" alt="'Project structure'"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add libraries as instructed and Sync Project. It will look something like this:- &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project-level build.gradle
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt; &lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;classpath&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.android.tools.build:gradle:3.4.1"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;classpath&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;google&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;gms&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;google&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nl"&gt;services:&lt;/span&gt;&lt;span class="mf"&gt;4.3&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;//Add this line&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;App-level build.gradle
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt; &lt;span class="n"&gt;dependendies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//...&lt;/span&gt;
  &lt;span class="n"&gt;implementation&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;google&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;firebase&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;firebase&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nl"&gt;core:&lt;/span&gt;&lt;span class="mf"&gt;17.0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;// Add this line&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;
 &lt;span class="c1"&gt;//Add to the bottom of the file&lt;/span&gt;
 &lt;span class="n"&gt;apply&lt;/span&gt; &lt;span class="nl"&gt;plugin:&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;google&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;gms&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;google&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;services&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Please use the latest firebase dependency available. &lt;br&gt;
 You can add it from Android Studio also by going to:&lt;br&gt;&lt;br&gt;
 File -&amp;gt; Project Structure -&amp;gt; Dependencies&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Step 3. Add react-native-firebase
&lt;/h2&gt;

&lt;p&gt;Go to your project root directory and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;react-native-firebase &lt;span class="nt"&gt;--save&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;(Optional) Link the module if your react-native version is less than 0.60.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;react-native &lt;span class="nb"&gt;link &lt;/span&gt;react-native-firebase
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;React Native version (&amp;gt;0.60) supports &lt;a href="https://facebook.github.io/react-native/blog/2019/07/03/version-60#native-modules-are-now-autolinked"&gt;autolinking&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Follow the Manual Linking guide if you're having any issues with linking &lt;code&gt;react-native-firebase&lt;/code&gt; or you're using an earlier version of React Native.&lt;/p&gt;

&lt;h2&gt;
  
  
  Manual Linking for React Native(&amp;lt;0.60)
&lt;/h2&gt;

&lt;p&gt;Check out the official &lt;a href="https://rnfirebase.io/docs/v5.x.x/installation/android"&gt;docs&lt;/a&gt; for updated method.&lt;/p&gt;

&lt;h3&gt;
  
  
  Android
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;react-native-firebase&lt;/code&gt; to App-level &lt;code&gt;build.gradle&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
 &lt;span class="c1"&gt;//...&lt;/span&gt;
 &lt;span class="n"&gt;implementation&lt;/span&gt; &lt;span class="nf"&gt;project&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;firebase&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;//Add this line&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;settings.gradle&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Add these lines&lt;/span&gt;
&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;firebase&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;firebase&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;projectDir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rootProject&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;projectDir&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;../&lt;/span&gt;&lt;span class="n"&gt;node_modules&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;react&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;firebase&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;android&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;MainApplication.java&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt; &lt;span class="o"&gt;...&lt;/span&gt;
 &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.invertase.firebase.RNFirebasePackage&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// import this&lt;/span&gt;

 &lt;span class="nd"&gt;@Override&lt;/span&gt;
 &lt;span class="kd"&gt;protected&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ReactPackage&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;getPackages&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ReactPackage&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
 &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;MainReactPackage&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt;
 &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;RNFirebasePackage&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt; &lt;span class="c1"&gt;// Add this line&lt;/span&gt;
 &lt;span class="o"&gt;);&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Sync Project and we are good to go.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4. Add Firebase Dynamic Links:
&lt;/h2&gt;

&lt;p&gt;We have to include other modules as the &lt;code&gt;RNFirebasePackage&lt;/code&gt; we imported earlier provides the core features only.&lt;br&gt;&lt;br&gt;
If you go to the &lt;a href="https://firebase.google.com/docs/invites"&gt;Firebase Invites Docs&lt;/a&gt;, you will see a warning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Firebase Invites is deprecated. You can create cross-platform invitation links that survive app installation using Firebase Dynamic Links. Please see the Migration Guide for more details.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It means we are eventually be using &lt;a href="https://firebase.google.com/docs/dynamic-links/"&gt;Firebase Dynamic Links&lt;/a&gt; module in our project.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the dependency to &lt;code&gt;android/app/build.gradle&lt;/code&gt; file:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
 &lt;span class="c1"&gt;// ...&lt;/span&gt;
 &lt;span class="n"&gt;implementation&lt;/span&gt; &lt;span class="s"&gt;"com.google.firebase:firebase-dynamic-links:19.0.0"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Edit &lt;code&gt;MainApplication.java&lt;/code&gt;:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;...&lt;/span&gt;
&lt;span class="c1"&gt;//import this package&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;io.invertase.firebase.links.RNFirebaseLinksPackage&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nd"&gt;@Override&lt;/span&gt;
&lt;span class="kd"&gt;protected&lt;/span&gt; &lt;span class="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ReactPackage&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;getPackages&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Arrays&lt;/span&gt;&lt;span class="o"&gt;.&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ReactPackage&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;asList&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
 &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;MainReactPackage&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt;
 &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;RNFirebasePackage&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt;
 &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;RNFirebaseLinksPackage&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;// Add this line&lt;/span&gt;
 &lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Sync Project and we are done. Let's move on to section 2.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're running into some dependency issues then &lt;code&gt;Migrate to AndroidX&lt;/code&gt;. Check &lt;strong&gt;How to solve dependency issues&lt;/strong&gt; at the end of this article.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;See &lt;a href="https://rnfirebase.io/docs/v5.x.x/links/android#Configure-Android-Project"&gt;official docs&lt;/a&gt; for updated method.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Test Dynamic Link on the device
&lt;/h1&gt;

&lt;p&gt;There are two steps involved in this section: -&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a Dynamic Link.&lt;/li&gt;
&lt;li&gt;Handle the Incoming Link.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 1. Create a Dynamic Link
&lt;/h2&gt;

&lt;p&gt;Let's generate a link on the Firebase Console and update our intent filter. This link must be unique and provided by &lt;em&gt;firebase&lt;/em&gt; itself. Follow these simple steps: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select your app on Firebase Console and click on &lt;strong&gt;Get Started&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MTVb4gVQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/get-started.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MTVb4gVQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/get-started.png" alt="'get started'"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a &lt;strong&gt;Domain&lt;/strong&gt;. It will probably take a couple of tries to find a unique domain. Note it down when you find one.&lt;br&gt;
&lt;em&gt;(example: &lt;code&gt;https://deeplinkblogdemo.page.link&lt;/code&gt; in my case)&lt;/em&gt; &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PkUXNv9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/add-domain.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PkUXNv9C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/add-domain.png" alt="'add domain'"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit &lt;code&gt;AndroidManifest.xml&lt;/code&gt; and update the &lt;code&gt;&amp;lt;data&amp;gt;&lt;/code&gt; tag in &lt;code&gt;intent-filter&lt;/code&gt; with the &lt;em&gt;Domain&lt;/em&gt; you just created:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;data&lt;/span&gt; &lt;span class="na"&gt;android:scheme=&lt;/span&gt;&lt;span class="s"&gt;"https"&lt;/span&gt;
 &lt;span class="na"&gt;android:host=&lt;/span&gt;&lt;span class="s"&gt;"deeplinkblogdemo.page.link"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Click on &lt;strong&gt;New Dynamic Link&lt;/strong&gt; and follow the steps. Provide both &lt;em&gt;Deep Link URL&lt;/em&gt; and &lt;em&gt;Dynamic Link name&lt;/em&gt; under &lt;em&gt;Setup your Dynamic Link&lt;/em&gt; section.
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CXszEJix--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/iamshadmirza/BlogsByShad/master/blogs/deep-linking/new-link.png" alt="'add domain'"&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we have created our Dynamic Link, we can move on to the next step.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2. Handle the Incoming link
&lt;/h2&gt;

&lt;p&gt;The root file of your project &lt;code&gt;App.js&lt;/code&gt; is the perfect place to add handling logic. So let's start editing the root file.&lt;br&gt;
Follow these three simple steps:- &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import firebase module.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;firebase&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react-native-firebase&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Add the code to watch for incoming links when the root file is mounted.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;url&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;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;links&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getInitialLink&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;incoming url&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&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;ol&gt;
&lt;li&gt;Open the created &lt;em&gt;Dynamic Link&lt;/em&gt; with any browser and check the log. Cheers if you can see the incoming url.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We can add conditions here to check for a certain match in url. On based of that we can write functions as per our need. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;url&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;firebase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;links&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;getInitialLink&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;url&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;some_condition_here&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
 &lt;span class="c1"&gt;//code to execute&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;Add navigation path or anything as per your need and you're good to go.&lt;br&gt;&lt;br&gt;
We will build a referral system in our React Native App using this logic because that will a perfect use case to demonstrate Dynamic Links. So don't miss the third and final part of this series.  &lt;/p&gt;

&lt;h2&gt;
  
  
  How to solve dependency issue
&lt;/h2&gt;

&lt;p&gt;You might run into some dependency issues because of the recent changes that happened to the &lt;code&gt;AndroidX&lt;/code&gt; library (because I did) and here is how I solved them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your &lt;em&gt;Project&lt;/em&gt; with Android Studio and select &lt;code&gt;app&lt;/code&gt; folder.&lt;/li&gt;
&lt;li&gt;Go to &lt;em&gt;Refractor -&amp;gt; Migrate to AndroidX -&amp;gt; Do refractor&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Sync Project. If the issues persist follow steps 4 and 5. &lt;/li&gt;
&lt;li&gt;You will probably see a &lt;em&gt;list of build issues&lt;/em&gt; in &lt;em&gt;Build Output&lt;/em&gt; below. Go through each one them and find the conflicting variable.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;ALT + ENTER&lt;/code&gt; and import the dependency. Remove the old one already present and we are done.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I hope you're able to resolve the issues and successfully implement the Dynamic Links from firebase.&lt;br&gt;&lt;br&gt;
Share this article if you find it helpful.&lt;br&gt;&lt;br&gt;
See you in the next article. Shad&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>reactnative</category>
      <category>beginners</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
