GitHunt
ET

ethanneff/reactotron-plugin-zustand

Plugin to monitor states from Zustand

reactotron-plugin-zustand

Plugin to monitor states from zustand.

Install

npm i -D reactotron-plugin-zustand

Setup

Go to file "Reactotron.config.ts" or your config reactotron from project, is similar to this file:

import Reactotron from 'reactotron-react-js';
import reactotronZustand from 'reactotron-plugin-zustand';

Reactotron.configure({ name: 'Project name' })
  .use(
    //add this line ๐Ÿ™Œ
    reactotronZustand({
      stores: [{ name: 'auth', store: useAuth }],
      omitFunctionKeys: true
    })
  )
  .connect();
Option Description Default
stores List of stores to be monitored by the Reactotron Zustand plugin.
stores[].name Name of the store to be monitored.
stores[].store Reference to the store hook to be monitored.
omitFunctionKeys Omit state functions false

Usage

Install Reactotron Client and add your store observer, using the example "auth" or all states using: "*".

Captura de Tela 2023-06-23 aฬ€s 00 09 08

Languages

TypeScript88.0%JavaScript8.1%HTML2.6%Shell1.3%

Contributors

MIT License
Created February 7, 2025
Updated February 7, 2025