Socket
Book a DemoInstallSign in
Socket

redux-behavior-subject

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-behavior-subject

Create simple store with behavior subject and track changes by demand with [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en) for better performance only when you set to debug (set session s

latest
Source
npmnpm
Version
2.0.6
Version published
Maintainers
1
Created
Source

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

Keywords

store

FAQs

Package last updated on 09 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.