1

At my work it's normal to have react files with over 1500 lines 🥲

Comments
  • 1
    Is it just a bunch of functions or are there 400+ line functions in those files.

    1500 line files are fine assuming that the functions are manageable.
  • 0
    @TestInProd423

    Yeah the details matter.
  • 0
    Fat models, thin controllers? Apply that logic to react, too, even tho' there's no innate structure for that. Extract fat logic into separate exported classes and you'll live longer without gray hair. 💪
  • 0
    @TestInProd423 Okay it's basically 1 component 1 page so the return statement is usually half or over half of the file and all logic for the page is on top...
  • 0
    @b1tnuk3d well no a lot of the times there are no models and the controller and view are just one big blob. The code is also littered with API calls and we don't use typescript while we have complex data coming from the API you just have to know what's being returned by the api
  • 1
    @UnknownError235 RIP maintainability. 😭
  • 0
    I got a project with a god class.. 6000 lines
  • 0
Add Comment