<?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: Rakesh Shravz</title>
    <description>The latest articles on DEV Community by Rakesh Shravz (@rakeshshravz).</description>
    <link>https://dev.to/rakeshshravz</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%2F647414%2Fb00b715f-4e15-47c0-923d-85e274a7e6ce.jpeg</url>
      <title>DEV Community: Rakesh Shravz</title>
      <link>https://dev.to/rakeshshravz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakeshshravz"/>
    <language>en</language>
    <item>
      <title>React folder structuring</title>
      <dc:creator>Rakesh Shravz</dc:creator>
      <pubDate>Thu, 06 Jan 2022 19:14:11 +0000</pubDate>
      <link>https://dev.to/rakeshshravz/react-folder-structure-10i2</link>
      <guid>https://dev.to/rakeshshravz/react-folder-structure-10i2</guid>
      <description>&lt;p&gt;Hey all great minds, this post is all about how I used to structure the react applications that I built so far. It's completely opinionated. Please comment with your thoughts.&lt;/p&gt;

&lt;p&gt;Let's assume that we are building a simple application with some common modules and features in it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4a07e7oyxeqhm72jxdl.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4a07e7oyxeqhm72jxdl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I always do the structuring based on the features or routes. This is the most common approach by the react community.&lt;/p&gt;

&lt;p&gt;From the above project view, when we open the "src" folder, all the folders with the feature name need to be aligned on the same vertical line. By looking at these folders inside the "src" folder, we should come to an idea of the nature of the application and what this project is about.&lt;/p&gt;

&lt;p&gt;Every features folder should contain an "index.js" file that has the root component of this feature. The presentational and non-presentational components are placed inside the "Components" folder. The other files are styles.js, actions.js, actionTypes.js, and reducers.js are placed within the folder for all the features&lt;/p&gt;

&lt;p&gt;Every feature folder should have all these files which help in code splitting and project folders looks identical which avoids chaos and helps better debugging.&lt;/p&gt;

&lt;p&gt;The "Common" folder can contain the styles, constants, utils and components which we think can be used by other components.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>architecture</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
