On Saturday, May 16, 2015 at 12:36:02 AM UTC+10, Colin Yates wrote: > For me, I can't use the 'snapshot app-db and discard' as the app-db is > synchronised with the server periodically. As you mention, I have a > number of roots in my app, one for 'ui' entries and one for 'views' > which are populated by the server, even if I want to discard the 'ui' > root I really don't want to discard the 'views'. > > I avoid local state as well simply because the benefit of being able > to capture the whole app-db and attach it to a bug report is awesome.
We've now hooked window.onerror and in production, and when there's an unhandled exception, we automatically do an "undo", to take the user back to the previous known sane state. It works a treat. (Not that we get many UHE, you understand :-)) It means the user still has a working program (with error message), and hasn't lost anything because of the problem. AND, as you say, we serialise the app-db and the event which caused the UHE, to form the perfect, reproducible bug report. (We also have a log of all previous events too ... because they are pure data). It brings a tear to my eye its so damn beautiful. That all comes almost for free because the data is all in the one place and because events are pure data to boot. -- Mike -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
