Events emitted by vue

Hi everyone!

There is some interesting thing in vue doc

this.$once(‘hook:beforeDestroy’, function () {
picker.destroy()
})

Where can i find other events like this?

I’ve never seen reference to this myself. A google search found this:

In that issue they discus attaching a callback to the life cycle events of another component, but since you’re asking about this.$once... why not just use the standard life cycle hooks: https://vuejs.org/v2/guide/instance.html#Instance-Lifecycle-Hooks

I believe technically this style of hook id internally used which is why they aren’t documented as a public API. The same can be achieved with the public api methods. I doubt these would change, but as they aren’t documented I would also be a bit worry of using them freely.