Menu Tree, Horizontal Menu : detect a target has been selected / Detect a dock is open

When we use an Horizontal Menu or menu Tree, How can we detect a target has been selected ?

page.props.path can trigger some action if the targeted view has changed, but if the view was already opened we can’t be notified.

Is threre some way to know if a dock is visible or not ?