Confirming Unload/Navigation In Salesforce Lightning
They actually released a component for this fairly recently:
https://developer.salesforce.com/docs/component-library/bundle/lightning:unsavedChanges/documentation
They actually released a component for this fairly recently:
https://developer.salesforce.com/docs/component-library/bundle/lightning:unsavedChanges/documentation