0.1.5 • Published 1 year ago

@coaction/logger v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@coaction/logger

Node CI npm license

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.

0.1.5

1 year ago

0.1.4

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago