Making a plugin listen to every component's lifecycle hooks #12633
Unanswered
LtdJorge
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I want to know if, apart from mixins, there is a way for a Vue plugin to listen to
created
,mounted
and other lifecycle events. The purpose is to make an instrumentation plugin that is able to report the metrics for component mounting, unmounting, etc.I'm pretty sure this can be done with mixins, but since those are not recommended, I would like to know if there's another way. So far, I haven't found anything that doesn't require the user of the plugin to call a plugin function on the lifecycle hooks themselves.
Beta Was this translation helpful? Give feedback.
All reactions