DEV Community

loading...

Discussion on: You don’t need React for building websites

bennypowers profile image
Benny Powers 🇮🇱🇨🇦

Preact is a fine choice.

Lit has the advantage of running directly in the browser without need for transpilation. You can get that with preact using htm instead of jsx

But really it comes down to this: as the user of your components, I don't really care which library you used to write them, I only care if they work with my app.

React fails that test, preact and lit pass.

Thread Thread
lukeshiru profile image
LUKESHIRU

The main advantage you have with React compared to Preact or lit, is that you can reuse hooks, components and utils created for React in the DOM and in native (iOS/Android) as well. I still prefer to create a good PWA with Preact, but still that's one of the main "selling points".
It generally boils down to the requirements of the project and to try to not default to a framework like Angular or a library like React right away, and try to see which tool better fits your needs before you start coding.

PS: Nice one mentioning htm, great library sadly not as widely used as it should.

Thread Thread
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

React native will be the death of the web.

We take it for granted that our grandchildren will have a world wide web, but it's not a given.

"Your tech stack doesn't matter, the only thing that's important is solving business needs" is how were going to lose the web to app stores, binary blobs, and (increasingly state controlled) proprietary silos.

Technology choices aren't neutral, they have a moral value. The open web, built on standards that belong to everyone, is a moral good. Whether or not future generations will benefit from that good is up to us as developers, at least in part.

Thread Thread
lukeshiru profile image
LUKESHIRU

I don't like mobile apps and Stores in general. If an app has a PWA version, that's the version I use. I was just pointing out that React Native is one of the main selling points of React... Sadly my personal preference has no power over the industry, so even if I prefer Preact and PWAs, people still use AppStores Dx