npm.io
1.3.0 • Published 7 years ago

dahlia-observable

Licence
MIT
Version
1.3.0
Deps
0
Size
22 kB
Vulns
0
Weekly
0

dahlia-observable

Installation

yarn add dahlia-observable

Quick Start

import { observable, observe } from 'dahlia-observable'

const store = observable({
  count: 1,
  increment() {
    store.count++
  },
})

observe(() => {
  console.log(store.count)
})

store.increment() // 2
store.increment() // 3

License

MIT License