Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joalisonpereira/reactotron-plugin-zustand
Plugin to monitor states from Zustand
https://github.com/joalisonpereira/reactotron-plugin-zustand
debugging javascript react reactnative reactotron typescript
Last synced: 23 days ago
JSON representation
Plugin to monitor states from Zustand
- Host: GitHub
- URL: https://github.com/joalisonpereira/reactotron-plugin-zustand
- Owner: joalisonpereira
- License: mit
- Created: 2023-09-13T08:40:41.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-21T09:08:43.000Z (about 2 months ago)
- Last Synced: 2024-10-01T00:43:51.210Z (about 1 month ago)
- Topics: debugging, javascript, react, reactnative, reactotron, typescript
- Language: TypeScript
- Homepage: https://github.com/joalisonpereira/reactotron-plugin-zustand#readme
- Size: 503 KB
- Stars: 19
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# reactotron-plugin-zustand
Plugin to monitor states from zustand.
![](./docs/badge-statements.svg) ![](./docs/badge-functions.svg) ![](./docs/badge-lines.svg) ![](./docs/badge-branches.svg)
## Install
```bash
npm i -D reactotron-plugin-zustand
```## Setup
Go to file "Reactotron.config.ts" or your config reactotron from project, is similar to this file:
```ts
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](https://github.com/infinitered/reactotron/tree/master) and add your store observer, using the example `"auth"` or all states using: `"*"`.