How to build scalable apps with React/Vue: Avoid code repetition and use reusable components

Using React / Vue / etc. doesn't automatically mean your app is scalable. You're not building scalable apps if you're still: - Copy-pasting the same code across pages - Skipping componentization - Avoiding reusable logic due to “speed” concerns What actually matters: - No repetition of code (especially at frontend) - Components with conditioning - Reusable, role-based logic I had 4 to 5 pages bloated with 1000+ lines each with same design yet different roles, lots of state logic. Refactored into reusable components and now just 300 - 400 lines per page, more maintainable, and faster to iterate. This is just one example of what the practice of reusability looks like. #frontenddevelopment #javascript #webdevelopment #saas

  • No alternative text description for this image

That's true, recently refactored some vibe coded slop. One component had over 1,300 LOC. I split to 6 separate ones. I'd rather spend time and have it be maintainable down the line

I used to avoid abstraction thinking it would slow me down, until the project got bigger and the maintenance itself became an overhead.

See more comments

To view or add a comment, sign in

Explore content categories