Skip to content
FRONTEND

State ownership: what lives on the client, and why

Itiner's edit history has to survive a regeneration. LeadScrapper's filters don't need to survive a refresh. Same framework, different answer.

Not every piece of state deserves the same lifetime

Itiner's draft-editing history has to outlive a page refresh and survive an AI regeneration: it's the record a redraft diffs against, so it can't live only in a component's memory. LeadScrapper's audit filters, by contrast, are disposable: reload the page and re-filtering from scratch costs nothing.

Treating both the same way, either persisting everything or persisting nothing, would be wrong in one direction or the other. The rule that held up: state a user would be upset to lose gets persisted; state that's cheap to recompute doesn't.