Summary#
Adds a dedicated Atoms guide to cover the missing atom documentation requested in #316.
The new page explains:
- what atoms are in TanStack Store;
- how writable atoms, readonly derived atoms, subscriptions, comparison, and async atoms work;
- how atoms compare with
Store;
- where framework adapters fit in;
- links to the relevant API reference pages.
Also adds the page to the Getting Started navigation.
Tests#
pnpm exec prettier --check docs/atoms.md docs/config.json
node --experimental-strip-types scripts/verify-links.ts
git diff --check
Note: pnpm run test:docs currently runs node scripts/verify-links.ts, which fails on this local Node 22 setup because the script is a .ts file without a loader. I ran the same link checker with Node's --experimental-strip-types flag instead.
Closes #316.
Summary by CodeRabbit#
- Documentation
- Added comprehensive guide to atoms as reactive primitives, including writable and derived atoms, async atoms with status semantics, custom equality mechanisms, and framework-specific integration examples for React, Preact, and Angular.
- Enhanced documentation navigation structure with new "Quick Start" and "Atoms" sections in Getting Started.
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
4cf1fce3-3905-4732-8bd3-1d2a0318dde1📥 Commits
Reviewing files that changed from the base of the PR and between 83e2978f627ec53616249b2bda1037749b18b6ab and 6388dc178b99942b1e0b3c487111175899326096.
📒 Files selected for processing (2)
docs/atoms.mddocs/config.json📝 Walkthrough
Walkthrough#
This PR adds comprehensive documentation for TanStack Store's atoms API as low-level reactive primitives, covering writable atoms, derived atoms, async atoms, and comparisons with stores. Navigation configuration is updated to include the new atoms documentation page in the Getting Started section.
Changes#
Atoms Documentation
docs/atoms.mddocs/atoms.mdcreateAtomAPI with examples ofget,set(supporting value or updater function), andsubscribe/unsubscribepatterns.docs/atoms.mdcompare, andcreateAsyncAtomwith pending/done/error state shapes.docs/atoms.mduseAtom/useSelector, AngularinjectAtom), and links to related API references.docs/config.jsonEstimated code review effort#
🎯 1 (Trivial) | ⏱️ ~8 minutes
Poem#
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
#316by adding comprehensive atom documentation including explanations, comparisons with Store, and API references.#316; no out-of-scope modifications detected.✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip
💬 Introducing Slack Agent: The best way for teams to turn conversations into code.
Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack.
👉 Get started
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share