https://github.com/mishamyrt/effector-queue
☄️ Library for sequential effect execution
https://github.com/mishamyrt/effector-queue
effector mutex
Last synced: 5 months ago
JSON representation
☄️ Library for sequential effect execution
- Host: GitHub
- URL: https://github.com/mishamyrt/effector-queue
- Owner: mishamyrt
- License: mit
- Created: 2024-03-08T19:58:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-10T20:28:24.000Z (over 1 year ago)
- Last Synced: 2025-01-07T12:12:23.380Z (6 months ago)
- Topics: effector, mutex
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
```