Hacker News new | ask | show | jobs
by kyleee 422 days ago
It’s probably about time for that to become fashionable again
3 comments

It's easy to forget how tedious things used to be before React became popular.

Keeping data in sync with the UI was a huge mental burden even with relatively simple UIs. I have no desire to go back to that.

Do you mean subscribing to events/callbacks, manually managing object lifecycle, manually inserting list elements, keeping it in sync with the state, etc, etc. Because that was all friggen horrible. Maybe new approaches could make it less horrible, but there is no way I’d go back to what it was like before React. If anything, I want everything to be more reactive, more like immediate mode rendering.
IIRC its what frameworks like Svelte do when they hit the compiler and optimize, which makes the best of both worlds.
They still nail "state" to element trees, which creates unbenchmarkable but real update costs. Svelte does better than react, but only within the same paradigm.
Can you describe what you mean by that a bit more? As I understand it, with the new signals-based system in Svelte, updating data directly updates the DOM.
It's also worth noting that the Svelte signals implementation is quite performant. [0]

[0] https://github.com/sveltejs/svelte/discussions/13277