I want a way to run a function (which talks to the backend) whenever a component is re-displayed.
I understand that the mounted
hook will fire if the component is re-added to the DOM by a v-if
directive. But, if the component is hidden and re-shown via a v-show
directive, this will not fire. I need to update the component regardless of what directive is in control of it's visibility.
I looked at the updated
hook but this seems to not be the indented use case.
How do I run a function whenever a component is displayed (not only for the first time)?