Skip to content

IC Reactor

ic-reactor 4 is a thin layer over a module that candid-core-cli 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"

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.

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.

In reading order.

The API reference in the sidebar is generated from the main branch as it stands, which can be ahead of the latest release.