useShadowStorageGetter
Callable
- const myHostObject = {};const myModuleState = useShadowStorageGetter(myHostObject)('@my-org/my-module', () => ({ foo: true }));const mySymbolState = useShadowStorageGetter(myHostObject)(Symbol.for('@my-org/my-module'), () => ({ bar: true }));
Return a new value from the shadow storage of
hostObjectif not previously set. This is handful when using hot module reload.