Aborting beforeDestroy in compositional (as opposed to navigational) applications

vue-core

#1

Hello,

In a compositional app, routing guards aren’t really relevant. In my application, for example, I route only to the high-level modules. Within those modules, however, the application is driven by component-is.

How do we prevent navigating away from a view in the presence of composition? It seems to me that I should just be able to return false from beforeDestroy (where true is assumed if a return value is not explicitly provided)?

Or am I missing something here? I mean, I understand I can place the logic elsewhere in the view. But often times there are a number of ways–even ways that are external to the view itself–that can cause beforeDestroy to invoke.

Thanks.