DEV Community

Discussion on: React Project Folder Structure

Collapse
 
metammodern profile image
Buniamin Shabanov

Great structure. I use almost the same except 2 folders:

  1. Api-config contains not only endpoints, but a DI mechanism based on react context.(hard in setup, but great in usage)
  2. No common folder, just components and hooks in src/.

And also a "types" folder whether I use TS or not(usually I do)
But I think I'll upgrade my structure and add common folder. Thanks for the idea.

Collapse
 
knitesh profile image
Kumar Nitesh

I still need to use Typescript, have been hearing lots of good stuff about it.

Collapse
 
metammodern profile image
Buniamin Shabanov

To be honest it has some bugs. On one of the conferences it was told that due to the bug in typescript a person died. The main idea was that it was a medical app and it was for doctors. The app did not render allergies block, cause it was based on typescript Map and there was a bug with copying that map. And the doctor did not see the allergies.
But anyway, imho it is more the case for not good test coverage.