Force trigger effects that depends on a shallow ref. This is typically used after making deep mutations to the inner value of a shallow ref.
const shallow = shallowRef({ greet: 'Hello, world'})// Logs "Hello, world" once for the first run-throughwatchEffect(() => { console.log(shallow.value.greet)})// This won't trigger the effect because the ref is shallowshallow.value.greet = 'Hello, universe'// Logs "Hello, universe"triggerRef(shallow)
https://vuejs.org/api/reactivity-advanced.html#triggerref
The ref whose tied effects shall be executed.
Generated using TypeDoc
Force trigger effects that depends on a shallow ref. This is typically used after making deep mutations to the inner value of a shallow ref.
Example
See
https://vuejs.org/api/reactivity-advanced.html#triggerref