<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aman Jain</title>
    <description>The latest articles on DEV Community by Aman Jain (@amanjaindev).</description>
    <link>https://dev.to/amanjaindev</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%2F443207%2F7feac988-6ace-4809-a9ef-77fe0252548b.jpg</url>
      <title>DEV Community: Aman Jain</title>
      <link>https://dev.to/amanjaindev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amanjaindev"/>
    <language>en</language>
    <item>
      <title>Unlocking Performance Gains in React: The useRef Advantage</title>
      <dc:creator>Aman Jain</dc:creator>
      <pubDate>Sun, 18 Feb 2024 19:47:39 +0000</pubDate>
      <link>https://dev.to/amanjaindev/unlocking-performance-gains-in-react-the-useref-advantage-mci</link>
      <guid>https://dev.to/amanjaindev/unlocking-performance-gains-in-react-the-useref-advantage-mci</guid>
      <description>&lt;h3&gt;
  
  
  Introduction:
&lt;/h3&gt;

&lt;p&gt;In React applications, optimizing performance is crucial for delivering a smooth user experience. One common optimization technique involves minimizing unnecessary re-renders, especially in components that frequently update state. While useState is a powerful tool for managing component state, it can sometimes lead to performance issues, particularly when used in scenarios where state changes trigger frequent re-renders. In such cases, useRef can be a valuable alternative for storing values that do not require triggering re-renders. In this blog post, we'll explore how to use useRef to optimize React applications and improve performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding useRef:
&lt;/h3&gt;

&lt;p&gt;Before diving into its usage, let's briefly understand what useRef is. useRef is a hook provided by React that allows us to persist values across renders without causing re-renders when the value changes. Unlike useState, changes to useRef values do not trigger component re-renders, making it suitable for scenarios where frequent updates occur without affecting the UI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Scenario:
&lt;/h3&gt;

&lt;p&gt;Let's consider a common scenario where we want to track the scroll position of a webpage and restore it when the user revisits the page. Typically, developers might use useState to store the scroll position, causing re-renders each time the scroll position changes. However, using useRef can help us avoid unnecessary re-renders in this scenario.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example Implementation:
&lt;/h4&gt;



&lt;div class="highlight js-code-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;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ScrollTracker&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;scrollPosition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&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="nf"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleScroll&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;scrollPosition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scrollY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="c1"&gt;// Perform any additional actions based on scroll position&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scroll&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleScroll&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;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;scroll&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleScroll&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="c1"&gt;// Restore scroll position on component mount&lt;/span&gt;
  &lt;span class="nf"&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="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;scrollTo&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="nx"&gt;scrollPosition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* Content */&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;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;h4&gt;
  
  
  Explanation:
&lt;/h4&gt;

&lt;p&gt;In this example, we define a ScrollTracker component that tracks the scroll position of the window using useRef. We initialize a useRef variable named scrollPosition with an initial value of 0. We then utilize the useEffect hook to add a scroll event listener to the window. Whenever the user scrolls, the handleScroll function updates the scrollPosition.current value with the current scroll position.&lt;/p&gt;

&lt;p&gt;Notice that updating scrollPosition.current does not trigger re-renders since it is a ref, not state. This ensures that frequent scroll events do not impact the performance of the component.&lt;/p&gt;

&lt;p&gt;Additionally, we use another useEffect hook to restore the scroll position when the component mounts. This ensures that the scroll position is maintained even when the user navigates away from and returns to the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion:
&lt;/h3&gt;

&lt;p&gt;In React applications, optimizing performance is essential for delivering a seamless user experience. By leveraging useRef instead of useState for storing values that do not require triggering re-renders, developers can significantly improve the performance of their applications. Whether it's tracking scroll position, managing focus, or caching values, useRef offers a lightweight and efficient solution for optimizing React components. By incorporating useRef into your development workflow, you can ensure that your applications are both fast and responsive, providing users with an enjoyable browsing experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cheat Sheet:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;useState: when you want that on change of this variable the component should update / re-render&lt;/li&gt;
&lt;li&gt;javascript variables: when you want to calculate something on every re-render but don't want to cause re-render &lt;/li&gt;
&lt;li&gt;useRef: when you want to keep some value across re-renders but don't want it to cause re-render&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
      <category>performance</category>
    </item>
    <item>
      <title>Python Shots! - Data Types</title>
      <dc:creator>Aman Jain</dc:creator>
      <pubDate>Sat, 15 Jan 2022 04:58:18 +0000</pubDate>
      <link>https://dev.to/amanjaindev/python-shots-data-types-i0p</link>
      <guid>https://dev.to/amanjaindev/python-shots-data-types-i0p</guid>
      <description>&lt;h3&gt;
  
  
  Python Data Types :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;None &lt;/li&gt;
&lt;li&gt;Numeric

&lt;ul&gt;
&lt;li&gt;int (num = 2)&lt;/li&gt;
&lt;li&gt;float (num = 2.5)&lt;/li&gt;
&lt;li&gt;complex (num = 1 + 2j)&lt;/li&gt;
&lt;li&gt;bool (is_num = True)&lt;/li&gt;
&lt;/ul&gt;


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

&lt;ul&gt;
&lt;li&gt;List - [1,2,3]&lt;/li&gt;
&lt;li&gt;Tuple - (1,2,3)&lt;/li&gt;
&lt;li&gt;Set - {1,2,3}&lt;/li&gt;
&lt;li&gt;String - ( str = "aman" )&lt;/li&gt;
&lt;li&gt;Range - ( range(10) )&lt;/li&gt;
&lt;/ul&gt;


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

&lt;ul&gt;
&lt;li&gt;Dictionary - {"key":"value"}&lt;/li&gt;
&lt;/ul&gt;


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




&lt;h3&gt;
  
  
  Description in Brief
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;List&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[10,20,30]=&amp;gt; to store list of elements&lt;/li&gt;
&lt;li&gt;mutable/can update value&lt;/li&gt;
&lt;li&gt;used when you need to update values time to time &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tuple &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(1,34,56,7,89,5) =&amp;gt; to store list of elements&lt;/li&gt;
&lt;li&gt;indexing from 0&lt;/li&gt;
&lt;li&gt;immutable/ can not update values&lt;/li&gt;
&lt;li&gt;good and fast while looping through of getting data as it can't be updatable&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;{23,56,78,90,54} =&amp;gt; to store list of elements&lt;/li&gt;
&lt;li&gt;no indexing &lt;/li&gt;
&lt;li&gt;stores unique elements only no repeatation&lt;/li&gt;
&lt;li&gt;fast for searching as it uses hash table concept&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Dictionary&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;{"key":"value"} =&amp;gt; store elements in key value pairs &lt;/li&gt;
&lt;li&gt;custom indexing&lt;/li&gt;
&lt;li&gt;used to deal with complex data like data inside data&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>beginners</category>
      <category>notes</category>
    </item>
    <item>
      <title>Which Linux Exist for What reason?</title>
      <dc:creator>Aman Jain</dc:creator>
      <pubDate>Tue, 08 Dec 2020 20:28:13 +0000</pubDate>
      <link>https://dev.to/amanjaindev/what-problems-did-different-linux-os-solve-cn</link>
      <guid>https://dev.to/amanjaindev/what-problems-did-different-linux-os-solve-cn</guid>
      <description>&lt;p&gt;Hello Folks, I was wondering that there are almost 1000 Linux distributions around us and Dammm! I just know a few of them. That was really demotivating for the first 10 seconds then I thought wait wait wait are they even used? or just developed for fun. After a deep research, I found that most of them are just started as a side project or a solution to a personal problem but some of them really makes difference and have a stand in this fast-moving world. So let's not talk and let me give a brief to you : &lt;/p&gt;

&lt;h4&gt;
  
  
  Ubuntu
&lt;/h4&gt;

&lt;p&gt;This is a Debian based Linux which proved to give best known simplistic user experience + support, and Yessss! I also felt the same.&lt;br&gt;
Points to note are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is providing a solid desktop (and server) experience, and it isn’t afraid to build its own custom technology to do it.&lt;/li&gt;
&lt;li&gt;Rich of Repositories and not so fancy yet powerful at the same time&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Linux Mint
&lt;/h4&gt;

&lt;p&gt;Mint is built on top of Ubuntu and known for having the best media support at that time but I think now we have software like VLC to do the job. Sooooo, goodbye mint👋 We need to break up 🙈&lt;/p&gt;

&lt;h4&gt;
  
  
  Fedora, RedHat and CentOS
&lt;/h4&gt;

&lt;p&gt;Fedora is started as a university project (as I mentioned🤭) with the aim to serve bleeding-edge software and support at the enterprise level and RedHat named community also supported the cause. But after a period of time in 2003 RedHat got divided into two entities Redhat Enterprise Linux(RHEL) and Fedora. They are still the same OS but RHEL adds extra support to companies to make some money and keep the purpose alive. But in August 2008 several Fedora servers were compromised ad that's where the boosted rise of RHEL happened. CentOS is just a copy of RHEL but it's just RHEL with less/no support.&lt;br&gt;
In short, they are Linux for the enterprise.&lt;/p&gt;

&lt;h4&gt;
  
  
  openSUSE / SUSE linux Eterprise
&lt;/h4&gt;

&lt;p&gt;Basically, openSUSE aimed to provide the best UI + powerful enterprise-level features and it is once known for its best Linux UI but eventually, Ubuntu took the crown. SUSE Linux Enterprise is the enterprise version of openSUSE. &lt;/p&gt;

&lt;h4&gt;
  
  
  Arch Linux
&lt;/h4&gt;

&lt;p&gt;Linux known for its deep roots. That means it's once the barest and grounded Linux where you have to manually configure everything but at the same time, you have the power to do everything. And at present, if you want a User experience near to MacOS then go for it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Kali Linux
&lt;/h4&gt;

&lt;p&gt;As we already heard, Kali Linux is known for its supercool 600 preinstalled hacking tools and a super awesome UI. It is actually a &lt;strong&gt;K&lt;/strong&gt;ernal &lt;strong&gt;A&lt;/strong&gt;uditing &lt;strong&gt;LI&lt;/strong&gt;nux but often misunderstood by Hindu goddess name "kali" mata. It actually became famous when actors used it multiple times in "Mr.Robot" t.v. series.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As I mentioned there are thousands of Linux-based OS but I think every OS is there for solving a particular problem so before installing any OS just find your use case. And if you think I left something then comment it down below and Don't forget to show some love in the comments down below.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Good Luck, Happy Coding!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>archlinux</category>
      <category>operations</category>
    </item>
    <item>
      <title>How to setup Android Studio in 4GB ram.</title>
      <dc:creator>Aman Jain</dc:creator>
      <pubDate>Sun, 06 Dec 2020 08:49:22 +0000</pubDate>
      <link>https://dev.to/amanjaindev/how-to-setup-android-studio-in-4gb-ram-209m</link>
      <guid>https://dev.to/amanjaindev/how-to-setup-android-studio-in-4gb-ram-209m</guid>
      <description>&lt;p&gt;For last three days I am messing with my windows 10 laptop having 4GB ram and no graphics card just for getting started with Android apps and guess what I have a solution for you.&lt;/p&gt;

&lt;p&gt;First of all there are two facilities provided by Android Studio : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IDE for Android Development &lt;/li&gt;
&lt;li&gt;Android Emulator for viewing output.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And minimum requirements for Android studio on Windows is:&lt;br&gt;
System requirements&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft® Windows® 7/8/10 (64-bit)&lt;/li&gt;
&lt;li&gt;4 GB RAM minimum, 8 GB RAM recommended.&lt;/li&gt;
&lt;li&gt;2 GB of available disk space minimum, 4 GB Recommended (500 MB for IDE + 1.5 GB for Android SDK and emulator system image)&lt;/li&gt;
&lt;li&gt;1280 x 800 minimum screen resolution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So basically it is saying that you have to use all of your hardwares to the fullest but unfortunately windows don't allow us, because there are a lot of processes running in background in windows that you can't stop. This is the time you have to make a decision that do you want to work on windows or Android Apps. I made a decision and chose Android apps over windows. So Right now I have a laptop and a will to work on Android. I started trying different solutions one after another and lucky me, the last one worked.&lt;/p&gt;

&lt;h3&gt;
  
  
  The solution for how to install Android studio in 4gb ram and no graphics card
&lt;/h3&gt;

&lt;p&gt;Now you need two things &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The guide of how to do it &lt;/li&gt;
&lt;li&gt;5-10 GB of internet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do you know that why linux based operating systems don't get viruses? Because viruses are also programs and to run a program you need permission. Now windows allows permissions to some programs by itself but on linux you even can't do +,- without permission. And that is the reason why macOS got its popularity. &lt;/p&gt;

&lt;p&gt;Now since you are working on windows you have two options &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Remove windows and completely work on Ubuntu ( Linux based OS with very nice UI like windows, the most user fiendly linux OS )&lt;/li&gt;
&lt;li&gt;Use a technique known as dual boot where you can easily work on two OS ( windows + Ubuntu ) simultaneosly on same PC without harming anyone.
&lt;em&gt;Yes of course I preffered 2nd one&lt;/em&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Go to "you tube" and search for "how to dual boot ubuntu on windows" and you will get the point. The above process will take your 3gb.&lt;/p&gt;

&lt;p&gt;Now by any means you should have your ubuntu linux. Now Inside ubuntu open &lt;code&gt;Ubuntu Software store&lt;/code&gt; , search for &lt;code&gt;Android Studio&lt;/code&gt; then install it. Anddddd boom! Now you can easily launch android studio. But wait follow this &lt;a href="https://youtu.be/6uWPMcJLrC4"&gt;You Tube Video&lt;/a&gt; to setup Android Studio. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You may face problems and I think as a developer this is what we always have to do: solve problems to achieve smething. So don't get demotivated and face them because I also did and I assure you that Android studio will work on your pc. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I will assure that you can easily write java/kotlin code in android studio but right now if you run your code Android Studio will crash due to low Ram. The solution is to attach your own android smartphone to Android studio and see results there as shown in above you tube video OR try this &lt;a href="https://www.youtube.com/watch?v=SRD6v0trzlA"&gt;You Tube Video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Just a quick fact Do you know&lt;/strong&gt;: you can also do android development in Eclipse and Idea IntelliJ.**&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Words
&lt;/h3&gt;

&lt;p&gt;Your Final Setup looks like: &lt;strong&gt;Ubuntu (Any linux based OS) + Android Studio + Android Smartphone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;See there is going to be a lot of hard work while doing Android development this way but when you launch your first Android App everything will pay oFF. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let me know in comments that is this blog useful or not and if you need a video tutorial on this, show some love down in comments&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Good Luck and HAPPY CODING!!!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>android</category>
      <category>java</category>
      <category>ubuntu</category>
      <category>windows</category>
    </item>
    <item>
      <title>Getting Started with React Native</title>
      <dc:creator>Aman Jain</dc:creator>
      <pubDate>Thu, 03 Dec 2020 13:39:59 +0000</pubDate>
      <link>https://dev.to/amanjaindev/getting-started-with-react-native-13pc</link>
      <guid>https://dev.to/amanjaindev/getting-started-with-react-native-13pc</guid>
      <description>&lt;h2&gt;
  
  
  React Native and react ecosystem
&lt;/h2&gt;

&lt;p&gt;To be really clear react is a Javascript library for building User interfaces, ReactDOM.render(...) adds web support otherwise React itself is platform-independent.&lt;br&gt;&lt;br&gt;
So what's react-native? It is a collection of special react components that are compiled to native app widgets. It acts as a bridge between Javascript and native platform code(java...).&lt;/p&gt;

&lt;p&gt;Hence &lt;code&gt;React + React Native = Real Native Mobile Apps (Android+IOS)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function comp() {
  return (
    &amp;lt;View&amp;gt;
      &amp;lt;Text&amp;gt; Hello !!! &amp;lt;/Text&amp;gt;
    &amp;lt;/View&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note: here View and Text are special components provided by react native and hence compiled into native widgets but the syntax is still react.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How React Native works :-&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2x0nfdbpooeifx9flx38.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2x0nfdbpooeifx9flx38.PNG" alt="react-native-working" width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now since we have a introduction about react native now we can start working on react native. There are two ways to start working with react native &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expo Client CLI = For beginners&lt;/li&gt;
&lt;li&gt;React Native CLI (barebone) = For advance people&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Expo is an extra wrapper on React native CLI which makes react native development workflow easy and effective. To get started visit &lt;a href="https://docs.expo.io/"&gt;https://docs.expo.io/&lt;/a&gt; and follow the expo documentation.&lt;br&gt;
There is one more special feature of the expo, even if your system doesn't have good ram then you can go to &lt;a href="https://snack.expo.io/"&gt;https://snack.expo.io/&lt;/a&gt; and start creating react native apps on your browser itself and you even don't need a mobile phone. With that said go ahead and setup expo and react native so that we can start coding apps. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: this is the first blog from my upcoming blog series on React Native and aiming to strengthen React Native community. So if you already know react native contribute with me or if you are new show some love.&lt;/em&gt;&lt;/p&gt;

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