0.0.2 • Published 1 year ago

flashlight-reactivity v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

  • Reactive store
  • Async store
  • Operators :(
  • Other stuff
0.0.2

1 year ago

0.0.1

1 year ago