# Extension points — pmndrs/valtio

> Canonical page: https://codevetter.com/unpack/valtio/extension-points

# Extension points — pmndrs/valtio

Scanned commit 26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Extensions primarily compose exported functions rather than register plugins. Utility barrels and separate package entrypoints define the public surface, while unstable internal APIs permit deeper runtime customization. Application actions, computed getters, persistence subscriptions, and external history packages provide higher-level composition. Website navigation and MDX plugin arrays offer separate documentation extension points.
- New vanilla helpers plug into src/vanilla/utils.ts, React helpers into src/react/utils.ts, and their combined exports reach valtio/utils through src/utils.ts. — [src/vanilla/utils.ts#L1-L7](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla/utils.ts#L1-L7) [src/react/utils.ts#L1-L1](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/react/utils.ts#L1-L1) [src/utils.ts#L1-L2](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/utils.ts#L1-L2)
- unstable_replaceInternalFunction supports wrappers around objectIs, newProxy, canProxy, createSnapshot, and createHandler; unstable_getInternalStates exposes the runtime maps, sets, and version holder. — [src/vanilla.ts#L378-L391](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L378-L391) [src/vanilla.ts#L394-L445](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L394-L445)
- unstable_enableOp accepts true, false, or a custom operation factory; subscribe exposes generated operation tuples, and nested listeners prefix paths for integrations consuming mutation records. — [src/vanilla.ts#L160-L164](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L160-L164) [src/vanilla.ts#L218-L226](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L218-L226) [src/vanilla.ts#L313-L329](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L313-L329) [src/vanilla.ts#L449-L458](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla.ts#L449-L458)
- deepClone and unstable_deepProxy accept a getRefSet provider, allowing caller-controlled identities to bypass reconstruction; unstable_deepProxy rebuilds descriptors and prototypes before wrapping ordinary containers. — [src/vanilla/utils/deepClone.ts#L17-L22](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla/utils/deepClone.ts#L17-L22) [src/vanilla/utils/deepProxy.ts#L28-L35](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla/utils/deepProxy.ts#L28-L35) [src/vanilla/utils/deepProxy.ts#L61-L75](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/src/vanilla/utils/deepProxy.ts#L61-L75)
- Application actions and computed getters are natural composition points: todo actions directly mutate proxies, while class/getter examples derive values without a reducer registry; persistence can attach through subscribe. — [examples/todo/src/store.ts#L23-L40](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/examples/todo/src/store.ts#L23-L40) [tests/vanilla/proxy.test.ts#L874-L895](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/tests/vanilla/proxy.test.ts#L874-L895) [docs/how-tos/how-to-persist-states.mdx#L11-L21](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/docs/how-tos/how-to-persist-states.mdx#L11-L21)
- Undo/redo extends state through external valtio-history's proxyWithHistory wrapper; derive documentation points to external derive-valtio and recommends migration to valtio-reactive rather than adding a built-in derive implementation. — [examples/editor-proxyWithHistory/src/App.tsx#L1-L14](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/examples/editor-proxyWithHistory/src/App.tsx#L1-L14) [examples/editor-proxyWithHistory/package.json#L12-L17](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/examples/editor-proxyWithHistory/package.json#L12-L17) [docs/api/utils/derive.mdx#L8-L26](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/docs/api/utils/derive.mdx#L8-L26)
- Documentation files provide frontmatter titles/metadata, prepareDoc builds links, getDocsMap indexes navigation by each final slug segment, and getDocsNav explicitly chooses sidebar entries; equal final segments therefore share the same map key. — [website/lib/mdx.ts#L218-L241](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/website/lib/mdx.ts#L218-L241) [website/lib/mdx.ts#L244-L286](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/website/lib/mdx.ts#L244-L286) [docs/readme.md#L5-L11](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/docs/readme.md#L5-L11)
- Website content transforms plug into bundleMDX's remark/rehype arrays and esbuild loaders; remarkCodeSandboxURLUpdater accepts configurable query parameters. Library packaging separately extends through Rollup's entry aliases and config-* selection. — [website/lib/mdx.ts#L129-L165](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/website/lib/mdx.ts#L129-L165) [website/lib/remarkCodeSandboxURLUpdater.ts#L21-L44](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/website/lib/remarkCodeSandboxURLUpdater.ts#L21-L44) [rollup.config.mjs#L11-L16](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/rollup.config.mjs#L11-L16) [rollup.config.mjs#L90-L101](https://github.com/pmndrs/valtio/blob/26d8ca8cb6e5bb3b9516d429e50bc5aab1f42e0d/rollup.config.mjs#L90-L101)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
