Sometimes we want to be able to prevent the user from navigating away from a given screen. Especially if some data has been modified but not yet saved. The CanDeactivate
guard allows us to do exactly this. In this lesson we will take a closer look by implementing one by ourselves.