0.6.0 • Published 4 months ago

glyx v0.6.0

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

glyx

The declarative state management library.

npm i glyx
const { $ } = store(() => {
  const count = atom(1)
  const expensive = derived(() => count.get() ** 10)
  const mult = select((factor: number) => count.get() * factor)

  const increment = () => count.set(count.get() + 1)

  return { count, expensive, mult, increment }
})

$.increment()
// .get() and .use()
$.count.get() // 2
$.expensive.get() // 1024
$.mult.get(10) // 20

const { count, expensive } = $.pick(['count', 'expensive']).get()
0.5.0

4 months ago

0.6.0

4 months ago

0.4.0

4 years ago

0.3.0

4 years ago

0.1.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago