top | item 45354798

(no title)

incoming1211 | 5 months ago

Huge as in usage? - yes it is huge.

Huge as in the library ecosystem? - yes it is huge.

Huge as in its a massive dependency? - yes it is huge.

I couldn't understand why React was so popular till I read a comment where someone explained that Tailwind and React in a large company allows the 1000s of devs to work in tiny little components without conflicting with others, and all of a sudden it makes sense why people make themselves suffer using React. Then everyone else is just following the large companies because "well X/Y/Z use it so we should too!!!"

discuss

order

kennywinker|5 months ago

React is 7.4kb minified, add react-dom and you add another 3.6kb - so ~11kb

Htmx is 59.9kb minified.

So it’s not huge in at least one dimension: file size.

https://bundlephobia.com/package/react@19.1.1

https://bundlephobia.com/package/react-dom@19.1.1

https://bundlephobia.com/package/htmx.org@2.0.7

tehbeard|5 months ago

https://bundlephobia.com/package/react-dom@18.3.1 130kb for react-dom 15-18 (would check more but site has rate limited me...)

So, while yes the very latest version of react is *finally* as slim as competitors like preact, don't act like all the legacy projects where a migration is off the table due to time or money just don't exist.

incoming1211|5 months ago

I just created a new vite react project. All it does is render:

function App() { return <div>Hello world</div> }

Publish it as if it would be deployed to prod. ~185kb

gloosx|5 months ago

Your level of understanding is not very huge. React is an absolute pleasure to use, and we do enjoy it - that is why it became the most popular library and a revolution in web dev.

miroljub|5 months ago

> Your level of understanding is not very huge

We don't need such comments here.