News for hackers. Stuff that matters.
Re:State-based vs Signal-based rendering by gcr on Monday October 20, 2025 @01:32PM (#45646646)
The OP is referring to the old days of javascript, where the UI was directed programatically and imperatively, e.g.

<div id="myoutput">Enter a name</div>

<input type="text" onchange="document.getElementById('myoutput').innerText = `Hello {name}!`" />

One upside of this approach is that the only subtree that needs to be re-rendered is the specific element whose state got mutated.

Another upside of this approach is that the code doing the mutation is very close to the actual UI element that triggered it. Of course, this rapidly turns into a downside as the size of the codebase grows...

There are no comments on this comment yet.