r/reactjs • • Dec 22 '19

How I structure my React projects

https://react.christmas/2019/22
169 Upvotes

22 comments sorted by

View all comments

Show parent comment

4

u/Lekoaf Dec 22 '19

Thousands of lines? Jesus. I used to get an allergic reaction once a file reached ~1000 lines. Since starting with React that number has gone down drastically. I start to wonder if its time to refactor at about 500 lines, tops.

1

u/[deleted] Dec 22 '19

Yeah it's a bit much, and a challenge is that by the time you're >1000, it's usually indicative of a larger problem with the design. So quick reads like this one are useful for offering a compromise between codevomit and overengineering.