Skip to content

Add target param to route hooks #3936

@tbontb-iaq

Description

@tbontb-iaq

The onActivated hook accepts a second parameter of type ComponentInternalInstance, which makes it possible to use it outside the setup block, such as in custom directives. I noticed that the underlying implementation of the vue router's composition api is actually onUnmounted, onDeactivated, and onActivated, which can all specify the component instance by passing in the second parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions