Installation
npm
npm install @fobx/core
yarn add @fobx/core
pnpm add @fobx/core
import * as fobx from "@fobx/core"
Deno
import * as fobx from "npm:@fobx/core"
Initial configuration
Call configure once at application startup — before creating any observables:
import * as fobx from "@fobx/core"
import { equals } from "fast-equals" // or any deep-equality library
fobx.configure({
// Required only if you use { comparer: "structural" } anywhere
comparer: { structural: equals },
// Global error handler for reactions and computed evaluations
onReactionError: (err) => console.error("[fobx]", err),
})
See configure for full option details.
What’s next
- Overview — a 5-minute tour of every feature
- API Reference — complete API documentation