Skip to content

SparkletreeContextValue

Defined in: react/src/provider.tsx:38

@sparkletree/react — React bindings for the SparkleTree SDK.

Two layers, and the boundary between them is the whole design:

  • PRIMITIVES (StreamText, useIsland) live in npm. They speak the wire, own the choreography, and carry the trust chrome structurally. They are ours to patch.
  • COMPONENTS (Hero, Cta) also ship as copy-paste source through sparkletree add. Those copies are the customer’s, and they are wire-ignorant by construction — no event names, no protocol versions, no timing constants — so a protocol change never obliges a customer to re-copy anything.

apiBase: string

Defined in: react/src/provider.tsx:39


apiBaseProvenance: "key" | "explicit"

Defined in: react/src/provider.tsx:42

Where apiBase came from — a key-derived base is an unsigned address and earns no mint POST unless first-party (see core’s maybeMint, S-2).


context: Record<string, unknown>

Defined in: react/src/provider.tsx:45

Context snapshot sent with every request in this page view.


optional fetchImpl?: (input, init?) => Promise<Response>

Defined in: react/src/provider.tsx:52

Test seam; defaults to the platform fetch.

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>


optional mintToken?: MintTokenSource

Defined in: react/src/provider.tsx:50

Signed mint token for fragment minting, if the page was given one.


organizationId: string

Defined in: react/src/provider.tsx:43


prefersStandard: boolean

Defined in: react/src/provider.tsx:47

Viewer asked for the standard (unmarked, unadapted-looking) version.


setPrefersStandard: (value) => void

Defined in: react/src/provider.tsx:48

boolean

void