A hook that simplifies the consumption of a versioned contexts that's stored inside a global singleton.
A key that uniquely identifies the context.
const versionedHolder = useVersionedContext<{ 1: string }>('my-context');if (!versionedHolder) { throw new Error('My context is not available!')}const myValue = versionedHolder.atVersion(1);// ... Copy
const versionedHolder = useVersionedContext<{ 1: string }>('my-context');if (!versionedHolder) { throw new Error('My context is not available!')}const myValue = versionedHolder.atVersion(1);// ...
A hook that simplifies the consumption of a versioned contexts that's stored inside a global singleton.