Get the existing or create a new versioned React context that's stored inside a global singleton.
A key that uniquely identifies the context.
const MyContext = createVersionedContext<{ 1: string }>('my-context');const MyContextProvider = ({children}) => ( <MyContext.Provider value={createVersionedValueMap({ 1: 'value-for-version-1' })}> {children} <MyContext.Provider>) Copy
const MyContext = createVersionedContext<{ 1: string }>('my-context');const MyContextProvider = ({children}) => ( <MyContext.Provider value={createVersionedValueMap({ 1: 'value-for-version-1' })}> {children} <MyContext.Provider>)
Get the existing or create a new versioned React context that's stored inside a global singleton.