Advanced
asd
triggerRef
customRef
markRaw
effectScope
getCurrentScope
triggerRef()
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.
customRef()
Creates a customized ref with explicit control over its dependency tracking and updates triggering.
customRef()
expects a factory function, which receives track and trigger functions as arguments and should return an object with get and set methods.
In general, track() should be called inside get(), and trigger() should be called inside set(). However, you have full control over when they should be called, or whether they should be called at all.
Example: debounced ref
markRaw()
Marks an object so that it will never be converted to a proxy. Returns the object itself.
effectScope()
Creates an effect scope object which can capture the reactive effects created within it so that these effects can be disposed together.
getCurrentScope()
Returns the current active effect scope if there is one.
onScopeDispose()
Registers a dispose callback on the current active effect scope. The callback will be invoked when the associated effect scope is stopped.