DEV Community


Posted on

Lines of code vs more Files

Good day devs.
I've been going through a react project and found the common used Utils.js file with more than 600 lines of code from global constants, functions and really big functional components, for me this is really messy I prefer having the utils.js with no more than functions, constants in a constants.js file and each functional component in its own file.

I'd like to know what do you thing about this.

Thank you for your time.

Top comments (2)

dividedbynil profile image
Kane Ong • Edited

You can put multiple small components in a single file too.