All we need is an easy explanation of the problem, so here it is.
Hoping if the Aura framework provides a way to trigger a controller method (similar to aura:systemerror, which fires on server-side exceptions), where we can handle those errors, and save the current work in a draft.
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
If an error sufficiently powerful enough to cause you to need to reload, Aura won’t be able to save you. Your only option is to add an error handler event yourself:
window.addEventListener('error', helper.errorHandler.bind(this, component));
This will allow you to take an action, such as saving the data to window.sessionStorage, or attempting to recover by calling an event. Again, this won’t work if the entire engine dies for some reason, but it can be a starting point.
As an aside, you can rather easily convert to a session-backed value provider in some cases. This can be used to keep track of the state.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂