Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mishamyrt/effector-queue
- Owner: mishamyrt
- License: mit
- Created: 2024-03-08T19:58:44.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-03-10T20:28:24.000Z (11 months ago)
- Last Synced: 2024-12-31T07:30:17.044Z (about 1 month 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)
```