This was originally posted as a twitter thread: https://twitter.com/chrisachard/status/1239993582397816838
There is no One Way
React is a librar...
For further actions, you may consider blocking this person and/or reporting abuse
Great tips ! However, I want to say, about codebase file structure, I think its best to find out what works for you early on in your career and stick to that --- regardless of the size of the project. This makes navigating around files a muscle memory action for you and also, later when the codebase starts to get complicated, it can be a hassle to re-organize everything and have everything regression tested.
What a pity that I haven't seen this before! I spent too much time figuring out how to organize my react project. Anyway I came to almost identical solution like you describe. Except I didn't know absolute imports. Thanks for reassuring me and showing absolute imports! Very helpful!
This is exactly the folder pattern that we are using in one of our project. It's much simpler and manageable. You're right about the css one. Having the css file in the same component folder where it is use is pretty much easier.
I am glad that i was already following 80% of what you mentioned. I learned that from a project repo of Kent C Dodds and it has been super useful till now.
This is pretty solid structure.
great tutorial I think it would have been even better if you went along with a simple project. Great explaining though
Great tips. Btw to add to no. 7, I prefer not using default exports for these reasons.
Ah interesting post - thanks!
great.
Thanks @chriz Achard, you teaching to easier learn with concept 🥰
Love you so much !!
Great one! Thanks!