v0 · Developer Preview Frond is under active development. APIs may change between releases.

Public surface

Two packages, imported as namespaces.

import * as Frond from "@frondruntime/core";
import * as FrondReact from "@frondruntime/react";

@frondruntime/core

Runtime

ExportPurpose
Frond.createRuntime(options?)Create a runtime. See Runtime and graph.
Frond.createRuntimeClient(runtime)Build a client over a runtime host.
Frond.RuntimeRuntime types — Runtime, RuntimeClient, RuntimeNodeHandle, reads, snapshots, events.

Node authoring

ExportPurpose
Frond.NodeBaseBase class every node extends.
Frond.resourceSpec / serviceSpec / facadeSpec / nodeSpecSpec 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.ArgsArgs.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

NamespaceContents
Frond.DriverAsync, Effect, Acquire, Refresh, Release, Action, Live. See Drivers.
Frond.Keysingleton(), structure(), canonicalKey(), Singleton, MAX_CANONICAL_KEY_LENGTH, key errors.
Frond.Signalschannel(), signal construction, runtime signal types.
Frond.DiagnosticscreateRuntimeReportSink, createErrorReport, projectError, serializeCauseChain. See Error projection and Tags and diagnostics.
Frond.GraphGraph types — NodeId, reads, snapshots, EvictResult, ResultValidity, failures.
Frond.EventsRuntime event types.
Frond.MobXMobX interop helpers.

@frondruntime/react

ExportPurpose
FrondReact.FrondProviderPut a runtime on context. See Provider.
FrondReact.useRuntime / useRuntimeClientReach the runtime imperatively.
FrondReact.useNodeAcquire and read with Suspense. See useNode.
FrondReact.useNodeStateRead with the lifecycle. See useNodeState.
FrondReact.useNodesRead a map of nodes.
FrondReact.useNodeControls / useNodesControlsRefresh, evict, release. See useNodeControls.
FrondReact.PreloadAcquire before render. See Preload.
FrondReact.getErrorReportProject a caught error into a displayable report.
FrondReact.getErrorRecovery / isRecoverableNodeErrorInspect 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.