Skip to main content

Promise Saga

A strongly typed side effects orchestrator

Strongly typed and adaptable

We built an adaptable tool to such popular libraries like Redux and Zustand, while encouraging Typescript as much as we could

In-component saga control

Keeping in mind React components have their own lifecycle, sagas run on component mount and automatically cancelled upon its unmount

Cancellable network requests

We provide adapters for fetch and Axios that support cancellable network requests with the help of AbortController out of the box

Example usage

Suppose we have a UI to fetch some user data from a remote server when a button is clicked. For brevity, we'll just show the action triggering code.

import {useDispatch} from 'react-redux';

function Todos(props: Props) {
const dispatch = useDispatch();

const onSomeButtonClicked = () => {
const {userId} = props;
dispatch({type: 'USER_FETCH_REQUESTED', payload: {userId}});
};

...
}