useGlobalValue CallableuseGlobalValue<Value>(key, initialValue): ValueReturn a new global value if not previously set. This is handful when using hot module reload.@exampleconst myModuleState = useGlobalValue('@my-org/my-module', () => ({ foo: true }));const mySymbolState = useGlobalValue(Symbol.for('@my-org/my-module'), () => ({ bar: true }));
Return a new global value if not previously set. This is handful when using hot module reload.