VueJS
Tricks for Vue Composition API
Generically Typed Vue Components Defining components in Setup Generic props Using SFC as a base component Extracting Prop Types from SFC…
Tips for Reactivity in Vue
Optional Reactivity Copy
import { Ref, ref } from 'vue';
type MaybeRef<T> = Ref<T> | T;
// example usage
// ✅ Valid
const raw: MaybeRef…
Shallow Dive into Injections in Vue
Refresh Library authors frequently use provide/inject API to transmit complex contextual information to their components and composition…
Async Function in Vue3 setup()
Problem When using asynchronous setup(), you have to use effects and lifecycle hooks before the first await statement. (details)
Copy
import…