nedux-logger
v1.0.1
Published
the next redux state management
Downloads
7
Maintainers
Readme
nedux-logger - Debug your nedux store
The official middleware logger for nedux. Performant and flexible.
📦 Installation
npm install nedux-logger --save
Install redux Devtool or something similar. (like RN debugger)
📜 Documentation
Import
// ES6
import { logger } from 'nedux-logger';
// ES5
var logger = require('nedux-logger').logger;
logger(storeName)
Create a middleware that allows you to debug your nedux store.
| argument | required | type | description |
| :---------: | :------: | :------: | :------------------------------------------ |
| storeName
| ✅ | string
| The store name (use to enhance readability) |
🎛 Basic Usage
import { createStore } from 'nedux';
import { logger } from 'nedux-logger';
type Store = {
token: string;
useless: number;
};
const store = createStore<Store>({ token: '', useless: 0 }, logger('my store'));
store.set('token', 'test');
🙋🏼 Contributions
All Pull Requests, Issues and Discussions are welcomed !