We've created a minimal Slice Object Store ( OStore
) and we want to get a snapshot of the current IS_AUTHENTICATED
value.
This is the object store implmentation:
import { ObsValueReset, OStore, OStoreStart } from "@fireflysemantics/slice";
const START: OStoreStart = {
IS_AUTHENTICATED: { value: false }
};
interface ISTART {
IS_AUTHENTICATED: ObsValueReset;
}
const OS: OStore<ISTART> = new OStore(START);
Approach
const snapshot = OS.snapshot(OS.S.IS_AUTHENTICATED);