Pinia-React can connect stores to the Redux DevTools Extension through the optional @pinia-react/devtools package.
This integration is intentionally separate from the core package and opt-in per store. It is a Redux DevTools integration, not a Vue Devtools integration.
Install the core library, the DevTools plugin, and the Redux DevTools browser extension:
Register the plugin immediately after creating the Pinia instance. Plugins are applied when a store is first created, so registration must happen before calling a store hook or getStore() helper.
The environment check is recommended for client-side applications, but it is not required for server rendering. The plugin does nothing when window or the Redux DevTools Extension is unavailable.
Stores are not connected automatically. Add devtools.enabled: true to every store you want to inspect:
enabled must be true. Omitting devtools leaves the store disconnected.
Each enabled store creates its own Redux DevTools connection. Use the plugin-level name to identify the application and the store-level name to identify the store:
This connection appears as Admin: Users. Without custom names, the store ID is used.
The plugin sends the following committed mutations to Redux DevTools:
$patch() calls, including their Immer patches.$reset() calls.The current store state is initialized when the connection opens. From Redux DevTools, Pinia-React handles:
state() function.State changes initiated by DevTools are not sent back as new mutations, which prevents feedback loops.
| Option | Type | Description |
|---|---|---|
name |
string |
Application prefix used for every store connection. |
| Option | Type | Description |
|---|---|---|
enabled |
true |
Explicitly connects this store. |
name |
string |
Overrides the store ID in the connection name. |
trace |
boolean |
Passes Redux DevTools action stack tracing through to the extension. |
The plugin does not provide Vue Devtools features such as a Pinia inspector, component-to-store inspection, or a Pinia-specific timeline. It also does not add in-app UI. All inspection and state-history controls live in the Redux DevTools Extension.
With lifecycle-enabled core, disposePinia(owner) and failed Store initialization release the Store's Mutation listener, the unsubscribe function returned by subscribe when present, and the connection's own unsubscribe when present. These are separate resources. Late messages are ignored. The plugin never calls extension-wide disconnect, so other Stores and instances keep their connections. Provider unmount alone does not close connections; the final owner must dispose explicitly after unmount.
Older core contexts without onDispose retain the previous runtime behavior; they do not gain complete resource disposal from upgrading this plugin alone.