Skip to content

Commit

Permalink
docs(api): add note for attachTo
Browse files Browse the repository at this point in the history
Add explanation about mounting mechanism. This information is available in v1 docs, but not in current.
  • Loading branch information
ArtemTropanets committed Dec 4, 2023
1 parent b6e5b82 commit 32a3b39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/index.md
Expand Up @@ -81,6 +81,8 @@ attachTo?: HTMLElement | string

Can be a valid CSS selector, or an [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element) connected to the document.

Note that component is appended to the node, it doesn't replace the whole content of the node. If you mount the component on the same node in multiple tests - make sure to unmount it after each test by calling `wrapper.unmount()`, this will remove the rendered elements from the node.

`Component.vue`:

```vue
Expand Down

0 comments on commit 32a3b39

Please sign in to comment.