3 ms·
To your second question about the app size vs. framework/library sizes: Frameworks and libraries provide generalised solutions to some common problems. In reac
by neoberg 4y ago
To your second question about the app size vs. framework/library sizes:
Frameworks and libraries provide generalised solutions to some common problems. In react and react-dom's case it's defining a ui in a declarative and more or less performant(wihtout making the dev think too much about it) way. The downside is; it includes lots of things your app doesn't need but other apps do.
The alternative is to roll your own but if your solution did all the things that the X framework did; then you'd end up with a similar size/complexity. You can build the features only needed by your app; but then I can't imagine the amount of engineering hours wasted for every apps custom framework.
And nowadays ~110kb is not that big of an application really. It might be really complex in terms of concepts and what it does but current day apps are a lot bigger than that in terms of size. So the size of frameworks doesn't make that much of a difference in most cases. For example the app I'm working on in my job has a total bundle size of ~15mb minified excluding any third party code. This is just the code written and being actively used by us. We don't serve it all at once and load as needed but still.
- Existenceblinks 4y agoSolid.js is very small (sub 7-8kB IIRC), very similar to React.
- neoberg 4y agoYes, and I think Solid and Svelte's approaches of moving complexity out of runtime and into build time will be the most popular one very soon. But this also comes with its downsides. It complicates the build process, obviously. Debugging is harder since what you code is not what is being run at all. And they usually come with some catches like "if you use this javascript thing, your reactivity will break" kinda stuff - at least for now, but I think it can and will be solved. The gist is; there are options and there are tradeoffs.
- Existenceblinks 4y agoThat's the only aspect of complaining. Size is one thing, it's also javascript for everything.