Provides a convenient hook mechanism to handle application navigation context of a component.

This will push the context when the component is mounted and will cleanup the context when the component is unmounted.

NOTE: if we use this to automate context pushing and cleanup, we must use this for component that is mounted due to user-event navigation, e.g. clicking, focusing, etc. else if the component is already pre-rendered and just temporarily hidden away (e.g. dialog) it is not safe to call this as it might mess up the stack. For this, use useConditionedApplicationNavigationContext