3 ms·
> This is factually incorrect. React is 6.4kB minified. What you are talking about is a bundle of React and ReactDOM. If you look at my comment again, you may
by azangru 3y ago
> This is factually incorrect. React is 6.4kB minified. What you are talking about is a bundle of React and ReactDOM.
If you look at my comment again, you may notice that I wrote "react-dom". I checked before writing.
> If you are saying “React is bigger than X”, you are comparing apples to oranges unless X can also do what React does. Which, per my previous comment, none of those frameworks can.
Does preact need a preact-dom library ten times its own size? Does lit? What is it that they do not do?
- strogonoff 3y ago> Does preact need a preact-dom library ten times its own size? Does lit? What is it that they do not do? No, but neither does it work outside of DOM. As I wrote in my first comment, you can use React anywhere (native apps, embedded LCDs[0], etc.), as long as you provide a suitable reconciler. It’s a tiny general reactive library that is neither a framework, nor is geared towards DOM/Web in particular. As far as I know, the same cannot be said about Preact. [0] https://github.com/doodlewind/react-ssd1306/blob/master/docs/tutorial.md https://github.com/doodlewind/react-ssd1306/blob/master/docs...
- azangru 3y ago> No, but neither does it work outside of DOM. I know. This thread was specifically about the web though. Web components? If you put React on the web, it is only fair to consider it together with react-dom in all the comparisons. Without a rendering library, React by itself, however small or generic, is not of much use. So what the absolute majority of people mean when they say "react" in the context of building things for the web, is the react/react-dom combination.
- strogonoff 3y ago> I know. This thread was specifically about the web though. Web components? That is exactly the point. This author compares Web Components to React and Astro. Web Components is a spec. React is a general-purpose XML-based reactive GUI rendering library. Astro and Next are frameworks. Next uses React, and Astro can use React. I think you can use React and ReactDOM to render custom elements on the Web already (or will be able to soon), nothing fundamental prevents it. Either the author is not experienced enough to understand what is what, or he tries to gather engagement by inciting a holy war using false dichotomies. > If you put React on the web, it is only fair to consider it together with react-dom in all the comparisons. React-the-library doesn’t cease to exist if you happen to use it with ReactDOM. It also doesn’t automatically become a framework. In addition, the Web exists within the rest of reality. Even if all of the above contenders were also libraries, if one library works independently of particular medium (e.g., can be used in native applications, etc.) then it exists on another level than any Web-centric library.