flashlight-reactivity
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Flashlight

Reactivity made simple

Installation

# via npm
npm i --save flashlight-reactivity

# via yarn
yarn add flashlight-reactivity

# via pnpm
pnpm i flashlight-reactivity

Usage

import { store } from 'flashlight-reactivity'

// Create a store
const myStore = store(0)

// Get store value
myStore.get()

// Set value
myStore.set(10)

// Subscribe
const unsubscribe = myStore.subscribe(value => {
	// Do something with the value...
})

// Unsubscribe
unsubscribe()

ToDo

  • [x] Reactive store
  • [ ] Async store
  • [ ] Operators :(
  • [ ] Other stuff

Package Sidebar

Install

npm i flashlight-reactivity

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

14 kB

Total Files

39

Last publish

Collaborators

  • jetstack