npm / jotai
jotai
What changed in jotai 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
27 breaking4 deprecations4 new APIs and options2 performance3 behavior and defaults2 tooling16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initjotai 322 changes
Breaking changes 14
The util moved from jotai/utils to the jotai-family package, so imports must use the new package.
The delay option was removed from useAtom and useAtomValue.
Published files target ES2020; projects supporting older browsers need to transpile the package.
CJS, UMD, and SystemJS builds are no longer provided; the package supplies an ESM build.
Package exports expose only the listed public entry points, so importing other package files directly no longer works.
The Babel preset and plugin moved to jotai-babel, so update configured package paths.
The loadable util was removed from jotai/utils; use unwrap instead, or implement the previous behavior in userland.
Node 20 support is dropped in v3, so developers may need to use a newer Node.js version.
Published files read this variable directly to omit development-only checks in production; browser use without a bundler requires defining it.
The minimum supported React version is raised to React 18.
The
setSelfoption has been removed from the atom'sreadfunction; there is no direct replacement.The setSelf option was removed from the atom's read function.
The minimum supported TypeScript version is raised to 5.5.
The
delayoption has been removed; create a custom hook for delayed values.
New APIs and options 2
A lower-level hook like
useAtomValuethat never suspends and returns an async atom's value without consuming it through React'suse().A lower-level hook built on
useSyncExternalStore; it trades concurrent rendering for no tearing and no missed update around mount.
Behavior and default changes 1
It uses
React.use()when available to suspend while reading a promise during render, and falls back to the previous behavior on React 18.
Tooling 1
The Jotai skill can be installed in a project to help a coding agent review and apply migration changes.
Fixes and other changes 4
Unmounts the last dependency when it is removed.
Handles circular references and typed arrays when freezing atoms.
The store type is now exported for developers who need to reference it in type-level code.
Synchronous onMount updates are now delivered to React subscribers, fixing a regression introduced in v3.0.0.
jotai 236 changes
Breaking changes 13
Performance improves in high-throughput scenarios.
unstable_onInit was removed as a breaking change.
The API was renamed to INTERNAL_onInit.
The utility is removed because abort support is included with normal atom usage.
Async atoms are normal atoms with promise values; getters no longer resolve promises, while useAtom continues to resolve them.
The delayInit option is removed because its behavior is now the default.
The module condition was dropped from package exports.
The initialValues prop is removed; use store and useHydrateAtoms instead.
The scope prop is removed; create a context with a store and use that store with useAtom instead.
splitAtom only accepts sync atoms; unwrap async atoms before passing them.
It can only accept writable atoms.
The utility is removed; use Promise.all instead.
The TypeScript type changes from separate Arg and Result parameters to Args as an argument tuple and Result; direct use of WritableAtom is generally discouraged.
Deprecations 4
The React delay option is deprecated.
The loadable utility is deprecated and will be dropped in v3.
setSelf in the atom read function is deprecated and will be dropped in v3.
atomFamily in jotai/utils is deprecated; migrate to jotai-family.
New APIs and options 2
The write function can accept multiple arguments and return a value.
Creates a store that lets developers directly get, set, and subscribe to atom values, and can be passed through a custom React context.
Performance 2
Core atom caching was enabled to improve performance in some cases.
store.get performance improved when atoms are not mutated.
Behavior and default changes 2
Development builds now warn when unsupported store mutations or side effects are detected.
It renders initialValue on the first render and the stored value, if any, on subsequent renders.
Tooling 1
TypeScript types are changed and improved.
Fixes and other changes 12
Prevents an infinite microtask loop when a rejected source is recomputed.
Fixes subscribers not being notified after nested store.set and sub/unsub operations inside a write.
Applies the reviver when parsing subscription updates from storage.
Stackoverflow errors are now thrown synchronously.
Uses a symbol index signature to avoid a Symbol.observable type reference.
ObservableLike now supports the Symbol.observable type.
Subscribers are notified when a derived read calls store.set, fixing a regression from v2.12.1.
Reactivity is preserved when get is called in a different atom.
Corrected the variance of the WritableAtom Result type parameter, improving TypeScript typing behavior.
Fixed a regression so unwrap no longer violates the store mutation rule.
Buildingblocks no longer invoke buildingblock definitions from top-scope, fixing an internal API issue affecting ecosystem libraries.
unwrap now recovers from errors.