0.1.5 • Published 6 months ago

@simple-persist/rxjs v0.1.5

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

SimplePersist RxJS

SimplePersist decorator to handle RxJS Subjects & BehaviorSubjects

Table of Contents

Installation

npm install @simple-persist/rxjs

Quick start

Add @PersistSubject() decorator to a Subject or BehaviorSubject class property:

import { PersistSubject } from '@simple-persist/rxjs';
import { BehaviorSubject, Subject } from 'rxjs';

class Foo {
  @PersistSubject() public bar?: Subject;
  // or
  @PersistSubject() public baz?: BehaviorSubject;
}

Note: All configuration options of @Persist() from @simple-persist/core are available for @PersistSubject() as well. Use the same syntax to define custom keygens, middlewares or storage for your decorator!

Read more

For more information (caveats, advanced use, other extensions) see @simple-persist/core.

Check out my article about the reasoning behind this package: Do we need state management in Angular?

Collaboration

Feel free to suggest features, open issues, or contribute! Also let me know about your extensions, so I can link them in this document.

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago

0.0.1

7 months ago