Skip to content

onUnmounted is called when there is no active component instance to be associated with. #3671

@jahnli

Description

@jahnli

Version

3.0.11

Reproduction link

https://jsfiddle.net/posva/x/

Steps to reproduce

When I tried to use onUnmounted outside of setup, the console got a warning

What is expected?

I don't know what caused it

What is actually happening?

When I tried to use onUnmounted outside of setup, the console got a warning

onUnmounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

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