Skip to content

Commit be4681f

Browse files
update documentation to include information about lifecycle hooks
1 parent 9ac748b commit be4681f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/guides/common-tips.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const wrapper = shallowMount(Component)
2727
wrapper.vm // the mounted Vue instance
2828
```
2929

30+
### Lifecycle Hooks
31+
32+
When using either the `mount` or `shallowMount` methods, you can expect your component to respond to all lifecycle events. However, it is important to note that `beforeDestroy` and `destroyed` _will not be triggered_ unless the component is manually destroyed using `Wrapper.destroy()`.
33+
3034
### Writing asynchronous tests using `nextTick` (new)
3135

3236
By default, Vue batches updates to run asynchronously (on the next "tick"). This is to prevent unnecessary DOM re-renders, and watcher computations ([see the docs](https://vuejs.org/v2/guide/reactivity.html#Async-Update-Queue) for more details).

0 commit comments

Comments
 (0)