0.1.5 • Published 11 months ago

@coaction/mobx v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@coaction/mobx

Node CI npm license

A Coaction integration tool for MobX

Installation

You can install it via npm, yarn or pnpm.

npm install coaction @coaction/mobx

Usage

import { create } from 'coaction';
import { bindMobx } from '@coaction/mobx';
import { makeAutoObservable } from 'mobx';

const useStore = create(() =>
  makeAutoObservable(
    bindMobx({
      name: 'test',
      count: 0,
      get double() {
        return this.count * 2;
      },
      increment() {
        this.count += 1;
      }
    })
  )
);

Documentation

You can find the documentation here.

0.1.5

11 months ago

0.1.4

11 months ago

0.1.1

11 months ago

0.0.1

11 months ago