DEV Community

Discussion on: Don't Optimize Your React App, Use Preact Instead

Collapse
 
nssimeonov profile image
Templar++

Then you realize - a lot of components you had don't work with preact, because they were made for react. Then you realize, that you have to implement a lot of functionality that comes out of the box with react... and suddenly you realize why react has a bigger footprint.

And the less code YOU write, the less bugs you have to fix, because let's agree on that - the bigger the codebase the more bugs there are.

Just my .02c

Collapse
 
leob profile image
leob

Couldn't have said it better ... look before you leap, things aren't always what they seem, there are always tradeoffs, and in most cases "it depends".

Collapse
 
brianmcbride profile image
Brian McBride

Imagine if there were a standard for components that could work across all the various front-end libs and frameworks.

Oh, there is? custom-elements-everywhere.com/
Of course, React doesn't support them properly.

While I do appreciate what React has given to the community as a whole - it would be so much better if we could get to a point where people are developing web components and then we can just focus on the other libs we need.

Just my .01c (yeah, it's a bargin today)

Collapse
 
nssimeonov profile image
Templar++

Yes, if you start a new project you can pick anything. And I wouldn't pick neither React nor Preact - I like Vue better.

But if you are handed a react codebase, converting it to preact isn't a one-day task and the bigger the project the more problems you will meet.

I'm working on the opposite conversion: Preact->React, and our company chose to do so for a reason.