This repository was archived by the owner on May 30, 2025. It is now read-only.
Version 3.1.3
Pre-release
Pre-release
New included snippets are listed below:
v3store
import type { InjectionKey } from 'vue'
import { inject, provide } from 'vue'
const store = () => {}
const storeKey: InjectionKey<ReturnType<typeof store>> = Symbol('composition-store')
export const provideStore = () => {
const state = store()
provide(storeKey, state)
return state
}
export const useStore = () => {
return inject(storeKey)!
}