@vasta/rx

A zero-dependency, simple reactive state library

Usage no npm install needed!

<script type="module">
  import vastaRx from 'https://cdn.skypack.dev/@vasta/rx';
</script>

README

vastarx

A zero dependency, simple reactive state

Install

npm install @vasta/rx

Usage

import { VastaRX } from '@vasta/rx';

const id = VastaRX.getState('key', (value) => {
    console.log('Updated value:', value)
})

const newValue = 1
VastaRX.setState('key', newValue)

VastaRX.unListen(id)