CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

mobxjs/mobx

Scanned commit 60be47cab0 dated 2026-09-30 — last upstream commit. Generated by codevetter 1.15.0 on 2026-10-02.

github.com/mobxjs/mobx ↗ · 349 files · 3.3 MB

MobX Simple, scalable state management. --- Documentation Documentation can be found at mobx.js.org.

Deep analysis by cli:codex via the codex CLI on 2026-10-02 (428s) — every claim below links to its cited source files. Source inspection; upstream code and tests were not executed.

Overview

MobX is a TypeScript state-management library for JavaScript applications, with React bindings, ESLint rules, and a legacy-decorator migration CLI in an npm workspace monorepo. Its core converts ordinary data into observable structures, records dependencies during reads, and propagates mutations through computed values and reactions. At commit 60be47cab0926d12f22449ec6c809fb5ec6601c4, distinctive implementation details include lazy decorator-backed values, batched reaction execution, and React observer cleanup combining native finalization with timers.

System map

The repository distributes libraries and developer tools through five npm workspaces. The core runtime owns an in-memory dependency graph, while React integration and source-analysis tools have separate package boundaries. Shared Rollup configuration produces consumer-specific bundles, and a separate Docusaurus package builds documentation.

Feature catalog

The developer-facing surface centers on observable data, derived values, and managed side effects. React adapters connect the same graph to function and class rendering. Companion packages provide lint diagnostics and migration transforms, while the website exposes reference documentation and generated error explanations.

Data flow

Inputs enter through observable factories, annotation maps, setters, and user-supplied callbacks. Enhancers transform values, administrations retain them, and synchronous reads build dependency edges. Mutations invalidate those edges and schedule effects or React updates; conversion and transport examples define the boundary toward external storage.

Behavior traces

The source supports complete walks through import initialization, observable construction, mutation propagation, and React rendering. Additional traces follow conversion, application-level autosave, and codemod execution. The autosave trace is explicitly a documentation example; it does not establish a bundled persistence service.

Testing signals

Tests and CI were inspected, not executed; no passing result or coverage percentage is asserted. The bounded inspection found Jest/ts-jest suites, React Testing Library integration tests, ESLint RuleTester fixtures, and codemod subprocess tests. Assertions cover important semantics and resource lifecycles, but configured CI steps have limits that require distinguishing script names from effective checks.

Risk map

These risks are source observations or explicitly labeled hypotheses, not confirmed vulnerabilities. The clearest sensitive boundaries are shell-enabled migration execution, build-time source evaluation, and application-controlled callbacks. Runtime changes have broad effects because global scheduling, dependency tracking, and React cleanup share tightly coupled state.

Extension points

Extension mechanisms are explicit interfaces and callback factories rather than a central runtime plugin loader. Observable annotations, enhancers, comparers, scheduling callbacks, and lifecycle hooks allow targeted customization. Package-level registries and shared configuration factories provide corresponding extension boundaries for lint rules and builds.

Contributor handoff

Begin with the owning package and trace its public API into state ownership before editing. Tests and CI were inspected, not executed, and this report is a bounded inventory rather than exhaustive coverage. Future execution should follow the task's authorization and account for build scripts, codemod tests, and documentation generation that write files.

Languages

LanguageFilesShare of source
TypeScript12664%
Markdown71docs/config
JavaScript7036%
JSON24docs/config
YAML10docs/config
CSS7docs/config
HTML5docs/config
Shell11%

Start reading here

Probable source entrypoint: packages/ — inferred from the directory tree and manifest, not the upstream docs.

Source roots

packages/ (229 files)

Source layout — packages/

PathFiles
packages/eslint-plugin-mobx/26
packages/mobx/115
packages/mobx-react/38
packages/mobx-react-lite/38
packages/mobx-undecorate/12

Repository structure

Top-level pathFiles
packages/229
docs/74
website/12
.github/11
scripts/3
.changeset/3

Docs found: CONTRIBUTING.mdREADME.mddocs/LINKS.mddocs/README.mddocs/about-this-documentation.mddocs/actions.mddocs/analyzing-reactivity.mddocs/api.mddocs/backers-sponsors.mddocs/best/debugging-mobx.md

Package

package.json — mobx-root, 48 declared dependencies.

@babel/core@babel/plugin-proposal-class-properties@babel/preset-env@changesets/changelog-github@changesets/cli@rollup/plugin-babel@rollup/plugin-commonjs@rollup/plugin-json@rollup/plugin-node-resolve@rollup/plugin-replace@rollup/plugin-terser@testing-library/dom

CI & config entrypoints

Structural health signals

Average score 7.6/10 across 96 analyzed source files; 14 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history