IC Reactor
ic-reactor 4 is a thin layer over a module that meant gen generates from a
.did file. The layer is a client with caller-scoped query keys, one error type
that says whether a call may have executed, helpers for token units, a test
client over an in-memory replica, and a React provider with useAuth. Reading
and writing use TanStack Query’s own hooks.
import { createClient } from "@ic-reactor/core"import { actor, type Actor } from "./generated/icrc1"
const client = createClient({ network: "ic", identity: "anonymous" })const ledger = client.canister<Actor>(actor, { id: "ryjl3-tyaaa-aaaaa-aaaba-cai",})
console.log(await ledger.icrc1_symbol()) // "ICP"Status
Section titled “Status”ic-reactor 4 is the current release, published under npm’s latest
dist-tag: npm install @ic-reactor/core installs it. The code is developed
on the main branch.
These pages describe what is built on main and nothing else. The one guide
that ships in the package, node_modules/@ic-reactor/core/llms.txt, is for
people and coding agents alike, and these pages agree with it. When main is
ahead of the latest release, the “Unreleased” section of the
CHANGELOG says
what npm does not have yet.
Coming from 3.x? Start with Migrating from 3.x: the 3.x names are gone, and that page maps each one to its 4 replacement.
Start here
Section titled “Start here”Build something
Section titled “Build something”Each build guide puts the pieces together into one small app, with a test.
Guides
Section titled “Guides”In reading order.
Packages
Section titled “Packages”The API reference in the sidebar is generated from the main branch as it
stands, which can be ahead of the latest release.