0.1.0 • Published 7 years ago
projective v0.1.0
projective
projective
: a tiny library for pure, reactive and composable state.
The gist
import { Ref } from 'projective'
const increment = x => x + 1
const decrement = x => x - 1
const ref = Ref.root({left: 0, right: 0})
ref.on(x => console.log(x))
ref.proj('left').modify(increment)
ref.proj('right').modify(increment)
ref.proj('left').modify(decrement)
That's it!
0.1.0
7 years ago