0.1.2 • Published 4 years ago

@replygirl/proxied-behavior-subject v0.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

ProxiedBehaviorSubject

A BehaviorSubject that returns a Proxy. All the reactivity, without having to call next!

Note: I literally haven't tested this

Installation

yarn add @replygirl/proxied-behavior-subject

Usage

import ProxiedBehaviorSubject from '@replygirl/proxied-behavior-subject'

const foo = new ProxiedBehaviorSubject({
  bar: true
})

const f = foo.proxy

console.info(f.bar, foo.value.bar) // true, true

foo.next({ bar: false })

console.info(f.bar, foo.value.bar) // false, false

f.bar = true

console.info(f.bar, foo.value.bar) // true, true

License

ISC (c) 2020 replygirl

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago