ReactJS Opinionated Component Folder Structure Create-React-App (CRA) TypeScript Project

Publié le: 25 novembre 2020
sur la chaîne: React Tutorials & Tips For ReactJs, d3 Developers
64
1

When you work on a React project and the code keeps growing in size, it can become overwhelming as it often includes a large number of components, and then it can be hard to find and maintain.

A neat way to organize your components so it makes it easier to find is to split the component into a separated component type.

This is my recommended folder structure to get started, however, feel free to change and use it as a suggestion only.

To create this structure create these folders.

src/components
src/features
src/layout
src/pages
src/redux
src/recoil/atoms
src/recoil/selectors

If you on a Mac you can use this one-liner in Terminal;

$ mkdir src/components src/features src/layout src/pages src/redux src/recoil src/recoil/atoms src/recoil/selectors

Take the Digital Course & Get 40 Pages React Book
https://www.udemy.com/course/getting-...

Get Free React 17 Book Chapter
https://elielrom.com/ReactBook

View the article on Medium
  / setting-up-professional-react-project-with...  

Learning React?
https://github.com/EliEladElrom/react...


Sur cette page du site, vous pouvez voir la vidéo en ligne ReactJS Opinionated Component Folder Structure Create-React-App (CRA) TypeScript Project durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur React Tutorials & Tips For ReactJs, d3 Developers 25 novembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 64 fois et il a aimé 1 téléspectateurs. Bon visionnage!