News for hackers. Stuff that matters.
Re:Ask HN: What happened to vanilla HTML/CSS/JS development? by pier25 on Friday September 09, 2022 @12:49PM (#32781662)
> to make "reactivity" (hence React)

You put it in quotes but some might be missing the point you're making which is that React is not reactive.

See this quote from the docs:

> There is an internal joke in the team that React should have been called “Schedule” because React does not want to be fully “reactive”.

https://reactjs.org/docs/design-principles.html#scheduling

Re:Ask HN: What happened to vanilla HTML/CSS/JS development? by pier25 on Friday September 09, 2022 @12:54PM (#32781760)
Another point I'd like to make is that you don't really need reactivity.

Frameworks like Mithril or Imba are not reactive, at all, and they work just fine for many use cases. The advantage is that state can be just vanilla JS. No need for any abstraction.

For example Mithril re-renders everything to the VDOM after a user event (click, etc) automatically. You can also tell Mithril to redraw [0] eg if you have a WS handler or something state change not related to user input.

I think Imba works very similarly but I don't have much experience with it.

It's a super simple mental model which I like a lot more than anything else. I'm mainly using Svelte now though for other reasons.

[0] https://mithril.js.org/redraw.html