Subscribe on changes!

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

avatar
amw
Jan 1st 2021

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.

avatar
Jan 1st 2021

Thanks for reporting. This indeed seems to be a mistake in the types, and made it's way into the docs from there.