@coaction/logger
v0.1.5
Published
A logger middleware for Coaction.
Downloads
254
Readme
@coaction/logger
A logger middleware for Coaction.
Installation
You can install it via npm, yarn or pnpm.
npm install @coaction/logger
Usage
import { create } from 'coaction';
import { logger } from '@coaction/logger';
const useStore = create(
(set) => ({
count: 0,
get countSquared() {
return this.count ** 2;
},
increment() {
set(() => {
this.count += 1;
});
}
}),
{
middleware: [logger()]
}
);
Documentation
You can find the documentation here.