Installation

npm

npm install @fobx/core

yarn

yarn add @fobx/core

pnpm

pnpm add @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 — browse one page per public function in the API section