2.0.6 • Published 4 years ago

redux-behavior-subject v2.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

redux-behavior-subject

Create simple store with behavior subject and track changes by demand with Redux DevTools for better performance only when you set to debug (set session storage see below ) it will start logging to chrome devtools

Demo

https://stackblitz.com/edit/redux-behavior-subject-example

Installing

Install the package

npm i redux-behavior-subject

Create simple service or any class and use it like a regular rxjs BehaviorSubject for example angular service with simple store to start logging to redux chrome extension in console run

sessionStorage.setItem('RBS_SESSION_TOKEN_ENABLE_DEBUG', 'true');
import { Injectable } from '@angular/core';
import {ReduxBehaviorSubject} from 'redux-behavior-subject';
import {User, Item} from './models';
@Injectable()
export class StoreService {

  public users$ = new ReduxBehaviorSubject<User[]>([], { entityName: "Users" });
  public items$ = new ReduxBehaviorSubject<Item[]>([], { entityName: "Items" });
  public counter$ = new ReduxBehaviorSubject<number>(0,{ entityName : "Counter"});

}

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • package created to simplify the use of
    • use the redux chrome extension only when needed
    • shallow clone the data when adding value
    • add action to every data change
    • only in debug mode if not sending action it will try to get it from the call stack
2.0.5

4 years ago

2.0.4

4 years ago

2.0.6

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.38.0

5 years ago

1.37.0

5 years ago

1.36.0

5 years ago

1.35.0

5 years ago

1.34.0

5 years ago

1.33.0

5 years ago

1.32.0

5 years ago

1.31.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago