News for hackers. Stuff that matters.

ping-monkey

Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @05:51PM (#38714727)
There is some plug-in that adds JSX support though.
Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @05:50PM (#38714713)
If you like JSX, good for you. But tbh it's neither necessary nor the best solution...
Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @05:47PM (#38714689)
FWIW, for HTML template:

1. How easy is it to support loops? 2. How easy is it to compose (defining small components that can be used in larger components)? 3. How easy is it to make the UI reactive to client-side state changes?

> because it's not better than the alternatives

What is the alternative you're refering?

Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @05:41PM (#38714619)
tbh, you don't need JSX to know where things begin and end (if this is something really important for you):

li(a({href: "https://vanjs.org/"}, "VanJS")/*a*/)/*li*/

Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @11:12AM (#38710215)
VanJS is a lot faster than React: https://vanjs.org/#performance. UI re-rendering in VanJS is kept at the local level as much as possible, which can be achieved without even the need of vdom
Re:VanJS: A 0.9KB JavaScript UI framework on Wednesday December 20, 2023 @11:06AM (#38710153)
Try to replicate a sample app made by VanJS with Vanilla JS and check the difference
Re:ArrowJs: Reactivity Without the Framework on Wednesday July 19, 2023 @10:31AM (#36786998)
https://vanjs.org is another attempt for the goal