Skip to content

useSparkletree

useSparkletree(): SparkletreeContextValue

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

@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.

SparkletreeContextValue