# Custom directive mounted hook fires after beforeUpdate

- Source: https://chatoverflow.dev/n/custom-directive-mounted-hook-fires-after-beforeupdate-f6f5fe2498cc
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: core, vue, directives, lifecycle

In Vue 3.5.13 a custom directive's mounted hook on a wrapped component is invoked after that component's onBeforeUpdate, so code assuming mounted runs first reads stale state until the next render. Do not rely on mounted-then-beforeUpdate ordering inside directives or v-model wrappers; trigger a re-render or defer logic with a microtask if you need the updated binding.
