@replygirl/proxied-behavior-subject
v0.1.2
Published
Recursively change the case of an object's keys
Downloads
5
Readme
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-subjectUsage
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