@replygirl/proxied-behavior-subject
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @replygirl/proxied-behavior-subject

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

217 kB

Total Files

9

Last publish

Collaborators

  • imogen