Create React App (294Mb) Compared with Re-Frame (72Mb)
A new create-react-app project currently weighs-in at 294Mb with a 293Mb node_modules folder containing 1017 modules. A new Clojurescript Re-frame project, by contrast, totals 72Mb of which node_modules makes up 12Mb containing 23 modules. A bit of a raw deal with CRA, don't you think, considering Re-frame gives you immutability for free and a full complement of built-in Clojurescript functions?
12 comments
[ 3.3 ms ] story [ 46.0 ms ] thread- have no idea what you are talking about,
- have no desire to use/learn anything else than JavaScript or something really close like TypeScript and will barf at the sight of ClosureScript's syntax,
- like their JSX and will barf at the sight of reagent's syntax,
- are used to infinitely large node_modules directories anyway.
The promise of re-frame is definitely interesting, but comparing directory size won't get you far when the real obstacles to adoption are elsewhere.
Here's one comparison. Smaller than React/Redux, but larger than Elm: https://cdn-media-1.freecodecamp.org/images/DRmH8Fz15DLxXguz...
The constant size of the API is emphasized when you look at the number of lines of code for the same app: https://cdn-media-1.freecodecamp.org/images/Y7vQUAUrMzGi8l3K...
Shouldn't be also the case of Elm apps? But they are tiny. Probably Re-frame wrapping React (and Redux?) doesn´t help at all. Why not being native (like Elm) or kind of a Svelte wrapper[1] to keep apps small? I really like Clojure expressiveness but I hate waste.
[1] https://clojureverse.org/t/create-web-app-with-shadow-cljs-a...
What matters:
- Size of .js files that are served to the user
- Speed and productivity of development
- Libraries, tutorials and documentations
- Maintainability of the project
Everyone uses Javascript, no-one uses Clojurescript. That statement in itself is one of the most powerful reasons to pick one framework over the other.
More interesting is:
* Build time
* Minified Production Bundle Size
* Developer Productivity
* Cross Browser / Old Browser Support
* + what romanovcode said :-)
https://github.com/Day8/re-frame