Skip to content

Discrepancy between code and documentation (also header) of app.unmount #2922

Closed
@amw

Description

@amw

Version

3.0.5

Reproduction link

https://v3.vuejs.org/api/application-api.html#unmount

Steps to reproduce

The documentation as well as this header say that app.unmount() takes DOM element/query string as an argument:
https://github.com/vuejs/vue-next/blob/a66e53a24f445b688eef6812ecb872dc53cf2702/packages/runtime-core/src/apiCreateApp.ts#L32
https://v3.vuejs.org/api/application-api.html#unmount

I don't think this makes any sense – the app is mounted on a single element and it knows its container. In fact if you take a look on the body of unmount it does not take any argument:
https://github.com/vuejs/vue-next/blob/a66e53a24f445b688eef6812ecb872dc53cf2702/packages/runtime-core/src/apiCreateApp.ts#L269

What is expected?

The docs should not mention any argument of app.unmount.

What is actually happening?

The documentation is confusing.


Sorry for not providing repro link. I don't know if there's separate issue tracker for documentation, but even it there is I can also see a problem in TypeScript header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions