DEV Community

loading...

Discussion on: How should we structure our React code? (1/2)

Collapse
johnlukeg profile image
John Luke Garofalo

It's because I added the .env file at the root folder which helps us resolve modules in the src/ folder without having to reference files using ../../../ from deep inside the file directory.

Suraj... I've been thinking there had to be a way to do this for so long. You just saved my life! Thank you for posting this!

Collapse
surajjadhav profile image
Suraj Jadhav Author

Wow, that's so good to hear. I am happy I could be of any help. Thanks for reading.