Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mishamyrt/effector-queue

☄️ Library for sequential effect execution
https://github.com/mishamyrt/effector-queue

effector mutex

Last synced: 26 days ago
JSON representation

☄️ Library for sequential effect execution

Awesome Lists containing this project

README

        


☄️ Effector Queue


Library for sequential effect execution.









This library allows you to make the effects run one after the other, rather than simultaneously. The next one will be executed only after the previous one is finished.

## Installation

```sh
npm install --save effector-queue@latest
```

## Usage

To create a queue, use the `createQueue` method. It returns a constructor that returns the effects. Effects created in this way will not execute at the same time.

```ts
const [createQueueEffect] = createQueue()

const firstFx = createQueueEffect(firstRequest)
const secondFx = createQueueEffect(secondRequest)
const thirdFx = createQueueEffect(thirdRequest)
```