npm / valtio
valtio
What changed in valtio 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
6 breaking2 deprecations1 new APIs and options1 behavior and defaults1 tooling2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initvaltio 213 changes
Breaking changes 6
The ops callback is disabled by default; call unstable_enableOp(true) from valtio/vanilla to keep the previous behavior.
All deprecated features have been removed.
Valtio no longer handles promises internally; use React’s use hook to manage promises.
proxy(obj) deeply modifies the supplied object instead of deeply copying it; use deepClone when you need to reuse the original object.
React 18 or later is required.
TypeScript 4.5 or later is required.
Deprecations 2
derive is deprecated.
watch is deprecated.
New APIs and options 1
Internal states and functions are exposed.
Behavior and default changes 1
useSnapshot is less optimized for compatibility with useMemo and the upcoming React compiler, and may cause extra re-renders in some edge cases.
Tooling 1
The build target is updated to ES2018.
Fixes and other changes 2
Removed from createSnapshotDefault for Hermes compatibility in React Native.
Reverted the change made in v2.2.0 that seemed to cause a problem in an edge case.