Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brandingbrand/cargo-hold-devtools

Package Overview
Dependencies
Maintainers
92
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brandingbrand/cargo-hold-devtools

Based on [NgRx Store Devtools](https://github.com/ngrx/platform/tree/master/modules/store-devtools)

  • 11.88.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by33.33%
Maintainers
92
Weekly downloads
 
Created
Source

Cargo Hold Devtools

Based on NgRx Store Devtools

Usage

import {
  Store,
  combineActionReducers,
  createActionCreator,
  matches,
  on,
} from '@brandingbrand/cargo-hold';
import { addDevtools } from '@brandingbrand/cargo-hold-devtools';

// Create Store as normal
const store = new Store({ count: 0 });

// Add Devtools after creating Store
addDevtools(store);

/**
 * Use Cargo Hold
 */
const add = createActionCreator({
  actionKey: 'add',
});

const subtract = createActionCreator({
  actionKey: 'subtract',
});

store.registerReducer(
  combineActionReducers(
    on(matches(add), () => ({ count }) => ({ count: count + 1 })),
    on(matches(subtract), () => ({ count }) => ({ count: count - 1 }))
  )
);

store.dispatch(add.create());
store.dispatch(add.create());
store.dispatch(subtract.create());
store.dispatch(subtract.create());
store.dispatch(add.create());

FAQs

Package last updated on 10 Aug 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc