5 ms·
React is not huge - I don't understand where that conception comes from.
by klysm 1y ago
React is not huge - I don't understand where that conception comes from.
- pier25 1y agoCompared to what?
- klysm 1y agoAnything - it's like 10kb
- fijiaarone 1y agoReact is not huge. It’s just a library that converts strings to tags. Oh you want to use React? You want JSX — the only use case for the React library? You want routing and URLs and history and state management and … ok you don’t want a virtual DOM but you need it. And you need Babel and a build tool and a generator framework (because piecing it all together is too hard) and tree shaking and CSS (in JS!) and lots of weird and complex lifecycle hooks. React is both bigger (in terms of bytes) and more complex than Angular. So, to answer your question, React is more complex than just about everything. I’d like to see you find a more complex framework.
- mikestorrent 1y agoSometimes it feels like those who would develop the next React should really just try to develop the next web browser. Why spend all this time and effort building what is essentially a massive wad of chewing gum and paperclips to take what is essentially a glorified document reader and make it into an application platform? We can run other executables on our local. The web itself is the problem and what needs to die to give way to something new.
- skydhash 1y agoA lot of those “apps” are just dynamic documents and forms that still fits the web model. It’s just that SPA is a bad architecture for them. Why push rendering to the client if all the data comes from the backend or need a round trip through there? But something like Figma, Slack is indead a huge hack in terms of technology, but it would be way less code and more performance to just have native desktop apps.
- duped 1y agoThe honest answer is because all your users have that wad of chewing gum and paper clips installed on their devices already, and you don't need an IT admin to whitelist your executable to install it in the contexts where that's still necessary.
- mycall 1y agoYou forgot to mention the chaos of npm CVE transitive dependency hell.
- spoiler 1y agoI worked with large React and large Angular (1 and 2+) codebases. I even migrated projects between them. I genuinely don't understand how Angular is considered simpler than React. Both have a build step. React hasn't needed a "generator" for years now (if you mean stuff like CRA). With tools like Vite or RSBuild, it's like 2 lines. Yeah, the JSX needs to be compiled, but so do templates, custom CSS dialect, and TS's old/non-standard decorators in Angular. Angular has way more quirks and reactivity foot guns than React. I think major React adoption painpoint is hooks, but while they are clunky, they're way "easier to hold" than most Angular tools. Same when it comes to state management libraries in angular, but I digress.
- incoming1211 1y agoHuge 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!!!"
- kennywinker 1y agoReact 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@19.1.1 https://bundlephobia.com/package/react-dom@19.1.1 https://bundlephobia.com/package/react-dom@19.1.1 https://bundlephobia.com/package/htmx.org@2.0.7 https://bundlephobia.com/package/htmx.org@2.0.7
- tehbeard 1y agohttps://bundlephobia.com/package/react-dom@18.3.1 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 1y agoI 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 1y agoYour 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.
- troupo 1y agoReact is huge compared to both itself and most of the competition. Compare the current React API to original React API. There are 18 hooks, Suspense, hydration, transitions, contexts, "user client"/"user server" etc.
- typpilol 1y agoAnd yet it's a 10th the file size of htmx
- troupo 1y ago"Huge" doesn't always refer to file size
- CooCooCaCha 1y agoYet you don’t have to use all of it, but it’s there if you need it.