When anything on the page changes, sapjs runs one pass over the app.
state=, bind, items=) into fresh objects. A state= attribute declares a field on an element.calc: fields in dependency order.text, show, attr: and class:. Write only what changed.Each pass rebuilds the app's data from the page, so no copy of the saved data in JavaScript can drift from it.
A paint writes only when the new value differs from the old one. A saved file already holds its painted values, so loading it changes nothing. The console reports that as mount writes 0.
React keeps its state in JavaScript and draws the DOM from it. In a file that saves itself, the DOM is what gets saved, and live sync rewrites it from outside. sapjs reads its state from there every time.
sapjs by David Miranda. MIT-0 license.