4 ms·
This is increasingly important for client-side devs as we use the History API to transition between pages without reloading. This upends our whole predictable s
by adamesque 15y ago
This is increasingly important for client-side devs as we use the History API to transition between pages without reloading. This upends our whole predictable state model starting with a page load and a clean slate.
Case in point: I recently built a web app / site with simple content, but very complex page-to-page animated SVG transitions.
The easiest part of the project was implementing the animated transitions. By far the hardest part was managing UI state, since you could enter the app from any URL endpoint.
Thing is, it was only the hardest part because I thought about it last, after I'd built the whole thing assuming a predictable initial state. An approach starting with a statechart might have saved me a ton of trouble.