<?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: Ramesh</title>
    <description>The latest articles on DEV Community by Ramesh (@rameshmanohar18).</description>
    <link>https://dev.to/rameshmanohar18</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%2F1224966%2Fd1754bd5-e0be-4238-afc4-bf144081166e.jpeg</url>
      <title>DEV Community: Ramesh</title>
      <link>https://dev.to/rameshmanohar18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rameshmanohar18"/>
    <language>en</language>
    <item>
      <title>REACT-JS Cheatsheet</title>
      <dc:creator>Ramesh</dc:creator>
      <pubDate>Sun, 23 Feb 2025 06:24:06 +0000</pubDate>
      <link>https://dev.to/rameshmanohar18/reactjs-cheatsheet-50p9</link>
      <guid>https://dev.to/rameshmanohar18/reactjs-cheatsheet-50p9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Components&lt;/strong&gt;&lt;br&gt;
Functional Component Syntax&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fquhm9fh966li25dhw1gt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fquhm9fh966li25dhw1gt.png" alt="Image description" width="739" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Functional Components are the future of React. Despite previously being solely used for stateless UI components, they are now the preferred way of constructing new components&lt;/p&gt;

&lt;p&gt;Pure (Functional) Components always generate the same output given the same input (state and props).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Imports/Exports&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Default Imports&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivtko2gg75bxy75yi65v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fivtko2gg75bxy75yi65v.png" alt="Image description" width="730" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Named Imports&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqi6oxxz7znokxtxallp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqi6oxxz7znokxtxallp6.png" alt="Image description" width="730" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can export as many named elements from a file as you wish. To do that you need to use the export keyword without the default keyword.&lt;/p&gt;

&lt;p&gt;Importing Named Exports&lt;br&gt;
import { capitalize, fetchUserData, getUserName } from 'path/to/file';&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;To import the named exports you need to list them explicitly within curly braces with the names they have been exported with.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;import { ExampleComponent as AliasedExampleComponent } from 'path/to/file';&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;import { capitalize as cap } from 'path/to/file';&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To create an alias you can use the as keyword followed by the new local name, which will be the name under which the imported component will be used in the current context.&lt;br&gt;
&lt;em&gt;**&lt;br&gt;
Import all&lt;br&gt;
import * as AliasedAllImport from 'path/to/file';**&lt;/em&gt;&lt;br&gt;
You can import all of the named exports from a file by using the * as syntax&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9f6g8pxm8lfr0rr2zec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9f6g8pxm8lfr0rr2zec.png" alt="Image description" width="773" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Props&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Using props in Functional Components&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With Functional Components, you have to expect props &lt;em&gt;objec_t to be passed from the _parent&lt;/em&gt;. You can then access the props on the props object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqytxogd2zlyx22qd29q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feqytxogd2zlyx22qd29q.png" alt="Image description" width="725" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A more efficient way to use props in Functional Components is to use destructuring assignment. We can then use the props directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhjargxusrft30vxc75r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhjargxusrft30vxc75r.png" alt="Image description" width="726" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>What is a redux in reacjts</title>
      <dc:creator>Ramesh</dc:creator>
      <pubDate>Sat, 22 Feb 2025 06:24:27 +0000</pubDate>
      <link>https://dev.to/rameshmanohar18/what-is-a-redux-in-reacjts-2f3d</link>
      <guid>https://dev.to/rameshmanohar18/what-is-a-redux-in-reacjts-2f3d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;br&gt;
There are some instances in your application state is needed by multiple components. I will use context if this shared state requires a lot of prop drilling. In the past, Redux was a popular solution to avoid prop drilling. However, I don't believe Redux is needed anymore. React's context api works great for this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Use Cases - Important!&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
You should use React context for global state. That being said, there aren't that many pieces of global state. Some good examples of global state are the current user, the current language setting, or a map of feature flags.&lt;/p&gt;

&lt;p&gt;You don't need to use context only for global state. Context can be applied to a specific sub-tree of your application.&lt;/p&gt;

&lt;p&gt;It's common to have multiple sub-tree specific contexts.&lt;/p&gt;

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