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 with [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en)

Source
npmnpm
Version
1.36.0
Version published
Weekly downloads
2
-89.47%
Maintainers
1
Weekly downloads
 
Created
Source

redux-behavior-subject

Create simple store with behavior subject and track changes with Redux DevTools

Demo

https://stackblitz.com/edit/rx-js-store

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

import { Injectable } from '@angular/core';
import {ReduxBehaviorSubject} from 'redux-behavior-subject';

@Injectable()
export class StoreService {
  private store = {
      counter$ : new ReduxBehaviorSubject<number>(0,'counter'),
      toDoList$ : new ReduxBehaviorSubject<Array<any>>([],'toDoList'),
      clock$ : new ReduxBehaviorSubject<object>(null,'clock'),
    };
 
  getStore(){
    return this.store;
  }

}

License

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

Acknowledgments

  • package created to simplify use of redux concept

Keywords

store

FAQs

Package last updated on 14 May 2019

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