News for hackers. Stuff that matters.
Re:Million: less than 1kb virtual DOM that is fast by aordano on Saturday July 30, 2022 @09:44PM (#32292344)
This reminds me so much of MithrilJS, and i also remember how terribly unergonomic it was, a terrible DX. The Vite JSX plugin is nice tho, I can see myself using this for something, but i will probably get tired of the ergonomics once i hit some complex component.

I am currently in early stages of writing a lightweight reactive framework more of the likes of Alpine and there are some things in this source that can prove fruitful. The rendering process is one of the most interesting things here imo.

Re:Million: less than 1kb virtual DOM that is fast by divbzero on Saturday July 30, 2022 @11:46PM (#32292977)
Coincidentally, the same command can work for both Million [1] and Mithril [2]:

  m('div', {id: 'box'}, ['hello'])
[1]: https://millionjs.org/docs/api/basics/m

[2]: https://mithril.js.org/hyperscript.html

Re:Million: less than 1kb virtual DOM that is fast by keb_ on Saturday July 30, 2022 @11:37PM (#32292925)
This looks nothing like Mithril.js outside of the superficial comparison of the hyperscript helper using `m` instead of `h`, but almost every popular reactive front-end lib has a hyperscript-like API.
Re:Million: less than 1kb virtual DOM that is fast by aidenyb on Saturday July 30, 2022 @11:12PM (#32292809)
Thanks for the feedback, Million has a React compat layer https://millionjs.org/docs/start-here too
Re:Million: less than 1kb virtual DOM that is fast by wruza on Sunday July 31, 2022 @04:56AM (#32294309)
I actually like hyperscript DX more than JSX/HTML. What I’ve found out though is that most “prettifiers” and formatters in editors (unlike vim) suck so much at hierarchical calls formatting.
Re:Million: less than 1kb virtual DOM that is fast by LAC-Tech on Sunday July 31, 2022 @04:57AM (#32294315)
I really don't find not having JSX a big deal. If left to my own devices I won't even code preact/react with JSX so I can avoid a transpile.
Re:Million: less than 1kb virtual DOM that is fast by pier25 on Sunday July 31, 2022 @01:27AM (#32293420)
Did you try Mithril with JSX? When I used it I thought the DX was great. Router and Http client included. No need for state management libs.
Re:Million: less than 1kb virtual DOM that is fast by echelon on Saturday July 30, 2022 @10:56PM (#32292738)
First time I've seen "DX". Developer experience, I assume from context?

That's an awesome term and I'm going to steal it.

Re:Million: less than 1kb virtual DOM that is fast by 8n4vidtmkvmk on Saturday July 30, 2022 @11:39PM (#32292941)
ya,. developer experience. thought it was kind of a lame term and first but now i kinda love it. dx all the way. aint using no framework i have to fight with even if it produces optimal ux. sorry users, i love me more than you
Re:Million: less than 1kb virtual DOM that is fast by hinkley on Sunday July 31, 2022 @04:29AM (#32294209)
Code that doesn’t work for the developers eventually won’t work for anyone else, either.
Re:Million: less than 1kb virtual DOM that is fast by franciscop on Sunday July 31, 2022 @02:10AM (#32293595)
I just used "dev experience" yesterday when I was going to use "DX" at first, just in case someone didn't know the term. I thought I was being silly and that by now everyone would know the term, but apparently I did the right thing to be a bit over paranoid here! Thanks for confirming:

https://twitter.com/FPresencia/status/1553263166796308481

Re:Million: less than 1kb virtual DOM that is fast by aordano on Saturday July 30, 2022 @11:00PM (#32292757)
Yes, developer experience. I thought it was a common term, maybe not so much.

And I agree, it's a great term :)

Re:Million: less than 1kb virtual DOM that is fast by LAC-Tech on Sunday July 31, 2022 @04:58AM (#32294322)
If this is the first time you've seen DX I've got two words for ya
Re:Million: less than 1kb virtual DOM that is fast by echelon on Sunday July 31, 2022 @05:37PM (#32299102)
I've heard "developer experience" a million times. My last company had a few teams devoted to it, and the existential need is palpable.

I've just never seen it in abbreviated form, and that's kind of shocking to me because it's so obvious.