TriggerRuntimeProvider
Stable · since 0.1.0
A React context provider that injects a custom Runtime into the tree. Every useEvent, useCondition, useAction, and useInspectHistory call inside the provider uses this runtime instead of the global singleton.
Use it when you need real isolation: parallel tests, micro-frontends running in one tab, multi-tenant apps where each tenant has its own trigger graph.
Import
Section titled “Import”Signature
Section titled “Signature”| Prop | Type | Required | Description |
|---|---|---|---|
runtime | Runtime | yes | The runtime descendants should use. |
children | ReactNode | yes | Subtree that gets the runtime. |
Examples
Section titled “Examples”One runtime at the app root
Section titled “One runtime at the app root”Per-test isolation (Testing Library)
Section titled “Per-test isolation (Testing Library)”Per-tenant micro-frontends
Section titled “Per-tenant micro-frontends”Nested providers
Section titled “Nested providers”The inner provider wins:
Related
Section titled “Related” TriggerScope Lighter, in-runtime partitioning by scope id.
createRuntime Construct the runtime you pass here.
getDefaultRuntime The fallback used when no provider is present.
Runtime guide Default vs isolated vs scoped — when to pick which.