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

app-saga-utils

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-saga-utils - npm Package Compare versions

Comparing version 0.9.1 to 1.0.0

dist/RootSaga.d.ts

4

dist/index.d.ts
export * from "./IWatcher";
export * from "./RootSagaBase";
export * from "./WatcherBase";
export * from "./RootSaga";
export * from "./Watcher";
export * from "./WatchFunction";
export * from "./IWatcher";
export * from "./RootSagaBase";
export * from "./WatcherBase";
export * from "./RootSaga";
export * from "./Watcher";
export * from "./WatchFunction";
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { TakeEffect, ForkEffect, PutEffect } from "@redux-saga/core/effects";
export declare type WatchFunction = () => IterableIterator<ForkEffect | TakeEffect | PutEffect>;
import { SimpleEffect } from "@redux-saga/core/effects";
export declare type WatchFunction = () => IterableIterator<SimpleEffect<any>>;
{
"name": "app-saga-utils",
"version": "0.9.1",
"version": "1.0.0",
"description": "Helpful utils for redux-saga",

@@ -5,0 +5,0 @@ "contributors": [

@@ -8,3 +8,38 @@ # Installation

```ts
// User.watcher.ts
import { Watcher } from "app-saga-utils";
import { UserActions } from "../redux";
import { UserSaga } from "./User.saga";
export class UserWatcher extends Watcher {
constructor() {
super();
this.watchLatest(
UserActions.SET_USER,
UserSaga.setUser
);
}
}
```
```ts
// RootSagaBase.ts
import { RootSaga } from "app-saga-utils";
import { UserWatcher } from "./User.watcher";
export class RootSagaBase extends RootSaga {
constructor() {
super();
this.addWatchers([
new UserWatcher(),
]);
}
}
```
and register your saga like usually `new RootSagaBase().run(sagaMiddleware);`

Sorry, the diff of this file is not supported yet

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