beforeDeactivate and afterDeactivate can be called for a view on the initial display without ever calling beforeActivate and afterActivate. This is happening because if a transition is done for a view where the current view is the same as the next view (which means there is not really a transition) we will still call beforeDeactivate and afterDeactivate and then call beforeActivate and afterActivate so that the view can be updated with data or parameters etc. But beforeDeactivate and afterDeactivate should not be called if the view is not currently active
beforeDeactivate and afterDeactivate can be called for a view on the initial display without ever calling beforeActivate and afterActivate. This is happening because if a transition is done for a view where the current view is the same as the next view (which means there is not really a transition) we will still call beforeDeactivate and afterDeactivate and then call beforeActivate and afterActivate so that the view can be updated with data or parameters etc. But beforeDeactivate and afterDeactivate should not be called if the view is not currently active