3 ms·
Nice project, well done! However, it is more like an alternative to Petite-Vue or Riot.js rather than full-blown Vue or React. Therefore your comparison vs hea
by niutech 3y ago
Nice project, well done!
However, it is more like an alternative to Petite-Vue or Riot.js rather than full-blown Vue or React. Therefore your comparison vs headlessui-react/vue is like apple vs orange/banana: headless UI listbox is much more complicated than your implementation. You can easily make a listbox in Vue using a similar amount of code as Nue.
One thing which is lacking in your Getting Started (https://nuejs.org/docs/nuejs/getting-started.html https://nuejs.org/docs/nuejs/getting-started.html) is how to use Nue without a build step, in order to progressively enhance existing HTML websites like Petite Vue: `<script src="//unpkg.com/petite-vue" defer init></script>` or Alpine.js: `<script src="//unpkg.com/alpinejs" defer></script>`?
How is Nue performance compared to other JS frameworks? Could you add it to https://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht...?
- tipiirai 3y agoThank you! You are right: Nue takes inspiration from Vue 2.0, petite-vue and Riot. I'll make the comparison more fair, but it doesn't take out the fact that React/Vue promote use of "spaghetti" code where logic/layout/styling are mixed together making the code hard to read and causes the size to grow. Everywhere I look the projects are unnecessarily big. Very often in the factor of 10x too big. Pretty sure Nue JS will always need a build step. I don't like the idea to load the compiler and run JS exec() on the client side. Heavy and unsecure. Haven't checked performance yet. I want to see this project getting more traction before deep diving to benchmarking
- hackerman_fi 3y agoI jumped straight to comparison (as it’s listed first) and was let down because the comparison seemed borderline deceiving. The other examples had hundreds of lines of logic and types for example.
- spoiler 3y agoAlso, it was comparing a headless library with a concrete (and rigid) implementation. You could use the a similar amount of React code to get the same concrete implementation. Probably not intentionally deceitful, but it a ridiculous comparison.
- niutech 3y agoHaving a zero-build-step bundle is a quick & easy way to experiment with a library and add simple interactions to existing static HTML websites, which is a big plus. However, according to BundleJS, only nuejs-core's compile() method is 36.2KB minified gzipped: https://deno.bundlejs.com/badge?q=nuejs-core@0.1.0&treeshake=%5B%7B+compile+%7D%5D https://deno.bundlejs.com/badge?q=nuejs-core@0.1.0&treeshake... - it is nowhere close to 2.3KB as on your website. Compare it to petite-vue's bundle, which is only 7.3KB: https://deno.bundlejs.com/badge?q=petite-vue@0.4.1 https://deno.bundlejs.com/badge?q=petite-vue@0.4.1
- tipiirai 3y agopetite-vue is about 3x bigger than Nue. here's the script: https://nuejs.org/@nue/js/nue.js https://nuejs.org/@nue/js/nue.js local gzip on my machine is 2.3kb
- niutech 3y agoYes, but it's only the Nue runtime which is 2.3KB, the compiler bundle is 36KB. Petite Vue includes everything in 7KB.