0.0.2 • Published 2 years ago

flashlight-reactivity v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

0.0.1

2 years ago