@@ -12,16 +12,17 @@ import type {
1212 useRelationships as useRelationshipsDecl ,
1313 useStore as useStoreDecl ,
1414} from '../@types/ui-react/index.d.ts' ;
15+ import { GLOBAL , isString , isUndefined } from '../common/other.ts' ;
1516import type { Id , Ids } from '../@types/common/index.d.ts' ;
16- import { IdObj , objGet , objIds } from '../common/obj.ts' ;
17- import { isString , isUndefined } from '../common/other.ts' ;
17+ import { IdObj , objEnsure , objGet , objIds } from '../common/obj.ts' ;
1818import type { Checkpoints } from '../@types/checkpoints/index.d.ts' ;
1919import type { Indexes } from '../@types/indexes/index.d.ts' ;
2020import type { Metrics } from '../@types/metrics/index.d.ts' ;
2121import type { Queries } from '../@types/queries/index.d.ts' ;
2222import React from 'react' ;
2323import type { Relationships } from '../@types/relationships/index.d.ts' ;
2424import type { Store } from '../@types/store/index.d.ts' ;
25+ import { TINYBASE } from '../common/strings.ts' ;
2526
2627const { createContext, useContext, useEffect} = React ;
2728
@@ -42,7 +43,11 @@ type ContextValue = [
4243 delExtraStore ?: ( id : string ) => void ,
4344] ;
4445
45- export const Context = createContext < ContextValue > ( [ ] ) ;
46+ export const Context : React . Context < ContextValue > = objEnsure (
47+ GLOBAL ,
48+ TINYBASE + '_uirc' ,
49+ ( ) => createContext < ContextValue > ( [ ] ) ,
50+ ) ;
4651
4752const useThing = <
4853 Thing extends
0 commit comments