react-zustand-devtools
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

react-zustand-devtools

npm size

use React Context with selector

Examples

Introduction

Zustand Devtools uses Redux devtools. Redux Devtools is great, but you can't debug multiple zustand stores.

Using this library, you can debug multiple stores

Install

This package has peer dependencies, which you need to install by yourself.

// npm
npm install react-zustand-devtools react zustand

// yarn
yarn add react-zustand-devtools react zustand

Usage

// store.ts
import { create } from "zustand";
import { devtools } from "react-zustand-devtools";

const useStore = create(
  devtools((set) => ({
    ...Store,
  }))
);
// component.tsx
import { ZustandDevtools } from "react-zustand-devtools";

const Component = () => {
  return (
    <ZustandDevtools>
      <button>open devtools</button>
    </ZustandDevtools>
  );
};

Readme

Keywords

Package Sidebar

Install

npm i react-zustand-devtools

Weekly Downloads

13

Version

1.2.1

License

MIT

Unpacked Size

507 kB

Total Files

60

Last publish

Collaborators

  • yunho1017