zustand-log-and-expose
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

Log and expose middleware for zustand

This is the middleware for Zustand state manager that logs store changes in console and exposes them in window object.

Usage is simple:

const logAndExpose = createLogAndExposeMiddleware("ConsolePrefix");

Then use logAndExpose variable as middleware.

Arguments that you will pass into the creator function will prepend console message.

Exposed stores are available through window._zustand after any change of store.

Readme

Keywords

Package Sidebar

Install

npm i zustand-log-and-expose

Weekly Downloads

7

Version

0.2.1

License

MIT

Unpacked Size

12.1 kB

Total Files

8

Last publish

Collaborators

  • emestie