@cdr-kit/react/Components/Vault
Vault
Compound component — Clerk's SignedIn / SignedOut pattern adapted to CDR. A single access drives the shared state; Vault.Locked, Vault.Loading, and Vault.Unlocked render against it.
import { Vault } from "@cdr-kit/react"
Usage
<Vault uuid={4200} auto>
<Vault.Locked> <SubscribeButton /> </Vault.Locked>
<Vault.Loading> <CdrSkeleton lines={3} /> </Vault.Loading>
<Vault.Unlocked> {(data) => <SignalView bytes={data} />} </Vault.Unlocked>
</Vault>Slots
Vault.Locked— status isidleorerror.Vault.Loading— status ispayingorcollecting-partials. Optional render-prop receives{ collected, threshold }.Vault.Unlocked— status isready. Render-prop receives the decrypted bytes.