Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It sounds like you're differentiating between model state and view model state.

I haven't used Om yet, but a potential approach could be to maintain two stateful objects: one for the model (e.g. stuff that you'd persist permanently), one for the view model (e.g. which tab is selected).

If you wanted your app to come back to exactly the same state after a page reload, you could persist the model in databases, and the view model in browser local storage.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: