Top "Redux-saga" questions

Redux-saga is a redux middleware library which designed for handling side effects in redux applications.

Pros/cons of using redux-saga with ES6 generators vs redux-thunk with ES2017 async/await

There is a lot of talk about the latest kid in redux town right now, redux-saga/redux-saga. It uses generator …

javascript reactjs redux redux-thunk redux-saga
React hooks: dispatch action from useEffect

My folder structure: |--App |--Components |--PageA.js |--PageB.js |--PageC.js |--common-effects |--useFetching.js I am refactoring my code to …

javascript reactjs redux redux-saga
How to get something from the state / store inside a redux-saga function?

How do I access the redux state inside a saga function? Short answer: import { select } from 'redux-saga/effects'; ... let data = …

javascript reactjs redux react-redux redux-saga
getState in redux-saga?

I have a store with a list of items. When my app first loads, I need to deserialize the items, …

javascript reactjs redux redux-saga
React store.getState is not a function

Here is my code: store.js import {createStore, applyMiddleware, compose} from 'redux'; import {fromJS} from 'immutable'; import {routerMiddleware} from 'react-router-redux'; …

javascript reactjs redux-saga
How do i check for token expiration and logout user?

The user can logout himself when he/she clicks on the logout button but if the token is expired he/…

javascript reactjs redux jwt redux-saga
Why use Redux-Observable over Redux-Saga?

I have used Redux-Saga. Code written with it is easy to reason so far, except JS generator function is messing …

javascript redux reactive-programming redux-saga redux-observable
Asynchronous api calls with redux-saga

I am following redux-saga documentation on helpers, and so far it seems pretty straight forward, however I stumbled upon an …

javascript api reactjs redux redux-saga
How to dispatch Redux action from stateless component when route is loaded?

Goal: when loading a react-router route, dispatch a Redux action requesting asynchronic Saga worker to fetch data for the underlying …

reactjs react-redux react-router-redux redux-saga
Redux Saga async/await pattern

I'm using async/await throughout my codebase. Because of this my api calls are defined by async functions async function …

redux react-redux redux-saga