Public surface
Two packages, imported as namespaces.
import * as Frond from "@frondruntime/core";
import * as FrondReact from "@frondruntime/react";
@frondruntime/core
Runtime
| Export | Purpose |
|---|
Frond.createRuntime(options?) | Create a runtime. See Runtime and graph. |
Frond.createRuntimeClient(runtime) | Build a client over a runtime host. |
Frond.Runtime | Runtime types — Runtime, RuntimeClient, RuntimeNodeHandle, reads, snapshots, events. |
Node authoring
| Export | Purpose |
|---|
Frond.NodeBase | Base class every node extends. |
Frond.resourceSpec / serviceSpec / facadeSpec / nodeSpec | Spec constructors. See Kinds. |
Frond.tag(value) | Create a node tag. |
Frond.dep(spec, args) | Declare one dependency. |
Frond.dependencies(resolver) | Declare a node’s dependency set. |
Frond.Args | Args.None / Args.none for no-arg nodes. |
Frond.resultCommit(result, options) | Attach validity/load metadata to a result. |
Frond.NodeSpec, Frond.NodeTag, Frond.Dep, … | Authoring types. |
Namespaces
| Namespace | Contents |
|---|
Frond.Driver | Async, Effect, Acquire, Refresh, Release, Action, Live. See Drivers. |
Frond.Key | singleton(), structure(), canonicalKey(), Singleton, MAX_CANONICAL_KEY_LENGTH, key errors. |
Frond.Signals | channel(), signal construction, runtime signal types. |
Frond.Diagnostics | createRuntimeReportSink, createErrorReport, projectError, serializeCauseChain. See Error projection and Tags and diagnostics. |
Frond.Graph | Graph types — NodeId, reads, snapshots, EvictResult, ResultValidity, failures. |
Frond.Events | Runtime event types. |
Frond.MobX | MobX interop helpers. |
@frondruntime/react
| Export | Purpose |
|---|
FrondReact.FrondProvider | Put a runtime on context. See Provider. |
FrondReact.useRuntime / useRuntimeClient | Reach the runtime imperatively. |
FrondReact.useNode | Acquire and read with Suspense. See useNode. |
FrondReact.useNodeState | Read with the lifecycle. See useNodeState. |
FrondReact.useNodes | Read a map of nodes. |
FrondReact.useNodeControls / useNodesControls | Refresh, evict, release. See useNodeControls. |
FrondReact.Preload | Acquire before render. See Preload. |
FrondReact.getErrorReport | Project a caught error into a displayable report. |
FrondReact.getErrorRecovery / isRecoverableNodeError | Inspect and retry a readiness failure. See Suspense and errors. |
Testing subpaths
import * as FrondTest from "@frondruntime/core/testing";
import * as FrondReactTest from "@frondruntime/react/testing";
See Testing for the harness, runtime helper, and spec stubs.
Next: Glossary.