<?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: Muhammad Awais</title>
    <description>The latest articles on DEV Community by Muhammad Awais (@awaisdev045).</description>
    <link>https://dev.to/awaisdev045</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4084350%2Fb5724a72-0708-466e-9f36-4c33f7df2b55.jpeg</url>
      <title>DEV Community: Muhammad Awais</title>
      <link>https://dev.to/awaisdev045</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/awaisdev045"/>
    <language>en</language>
    <item>
      <title>Destructuring in React Native</title>
      <dc:creator>Muhammad Awais</dc:creator>
      <pubDate>Tue, 25 Aug 2026 09:40:09 +0000</pubDate>
      <link>https://dev.to/awaisdev045/destructuring-in-react-native-310p</link>
      <guid>https://dev.to/awaisdev045/destructuring-in-react-native-310p</guid>
      <description>&lt;h3&gt;
  
  
  Understanding Destructuring in JavaScript 🚀
&lt;/h3&gt;

&lt;p&gt;If we use the same approach again and again, our code can become repetitive and less readable. To overcome this, &lt;strong&gt;Destructuring&lt;/strong&gt; plays an important role in JavaScript.&lt;/p&gt;

&lt;p&gt;Destructuring is a shorter and cleaner way to extract values from arrays and objects. Instead of accessing values through the parent object every time, we can directly extract them and make our code more readable and structured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Awais&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Old way&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&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;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Using destructuring&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Person&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Destructuring does not affect the original object. It simply extracts the values and makes them easier to use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Small concept, but an important step toward writing cleaner JavaScript. 💡&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  JavaScript #Programming #WebDevelopment #LearningInPublic
&lt;/h1&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>productivity</category>
      <category>resources</category>
    </item>
    <item>
      <title>useState vs useReducer 🚀</title>
      <dc:creator>Muhammad Awais</dc:creator>
      <pubDate>Fri, 21 Aug 2026 12:34:54 +0000</pubDate>
      <link>https://dev.to/awaisdev045/usestate-vs-usereducer-7k4</link>
      <guid>https://dev.to/awaisdev045/usestate-vs-usereducer-7k4</guid>
      <description>&lt;p&gt;useState is perfect for managing simple local state while and useReducer is go to alternative when the state logic becomes complex and deeply nested &lt;br&gt;
How it Works:&lt;br&gt;
Arguments:It accepts two arguments - reducer funtion and inital state.&lt;br&gt;
Return: It return a pair in an array - current state and dispatch function.&lt;br&gt;
dispatch function: dispatch function is used to update the state just like updater function in the useState.&lt;/p&gt;

&lt;p&gt;Quick Syntax:const[state,dispatch] = useReducer(reducer,initial State).&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>learning</category>
    </item>
    <item>
      <title>useState in React Native</title>
      <dc:creator>Muhammad Awais</dc:creator>
      <pubDate>Thu, 20 Aug 2026 13:05:21 +0000</pubDate>
      <link>https://dev.to/awaisdev045/usestate-in-react-native-4iok</link>
      <guid>https://dev.to/awaisdev045/usestate-in-react-native-4iok</guid>
      <description>&lt;p&gt;useState is a React Hook that is used in React Native it allows to add a state in functional components(accepts props as an argument and return JSX to render UI).&lt;br&gt;
useState returns an array with two values,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Current State&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Function to update the state&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;we can set a initial value in useState to startwith&lt;br&gt;
const [count,setCount] = useState(1);&lt;br&gt;
here 1 is the initial value count is the current State and setCount is the function to update that current state &lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>programming</category>
      <category>resources</category>
    </item>
    <item>
      <title>Flatlist vs ScrollView</title>
      <dc:creator>Muhammad Awais</dc:creator>
      <pubDate>Wed, 19 Aug 2026 06:44:07 +0000</pubDate>
      <link>https://dev.to/awaisdev045/flatlist-vs-scrollview-3a3g</link>
      <guid>https://dev.to/awaisdev045/flatlist-vs-scrollview-3a3g</guid>
      <description>&lt;p&gt;When rendering a list of items in react native we commonly use Flatlist and Scrollview.&lt;br&gt;
Flatlist Renders only those items which are visible on the screen but ScrollView renders all the items once so it can take more space of the memory which can slow down the visibility or memory leakage in react native app when rendering a list of items &lt;/p&gt;

</description>
      <category>mobile</category>
      <category>performance</category>
      <category>react</category>
      <category>reactnative</category>
    </item>
  </channel>
</rss>
