redux-saga Questions

4

Solved

How to handle firebase auth state observer in redux saga? firebase.auth().onAuthStateChanged((user) => { }); I want to run APP_START saga when my app starts which will run firebase.auth().on...
Bootlick asked 3/8, 2018 at 12:31

1

I did some updates to my app's packages like: "react-redux": "^5.0.6" => "^6.0.1", "redux": "^3.7.2" => "^4.0.1", "redux-saga": "^0.16.0" => "^1.0.1" but I get the error Cannot read...
Strapless asked 25/2, 2019 at 8:25

6

Is there a way to debounce in Redux-Saga where subsequent calls are queued up behind the same delay, which keeps getting bumped by each new task added to queue. Similar to lodash's debounce https:/...
Adrienadriena asked 23/5, 2016 at 13:15

5

Solved

I have a filter component: export const PostsFilter = (props) => ( <Filter {...props}> <TextInput label='Post ID' source='id' alwaysOn /> <TextInput label='User ID' source='us...
Bos asked 22/10, 2018 at 9:37

6

Solved

I built an app in React/redux that works in every browser I tried, BUT Safari on MacOS and any browser on iPhone. I get no error, no console message, nothing that would give me some idea. It only r...
Stempson asked 9/5, 2016 at 12:38

4

Solved

Having just moved from thunks to sagas I'm trying to find the best way to call setTimeout and then from within that function call another function (in this case corewar.step()). This was my origina...
Drabeck asked 31/12, 2017 at 17:16

2

I recently started using Redux-Saga in a React project since it was new to me and I wanted to learn how it works. I also started using Formik since it appears to have eclipsed Redux-Form in popular...
Sensible asked 19/3, 2019 at 12:5

1

Solved

Issue: React Navigation V5 + Redux Saga: How can I navigate from the Saga? I've tried using CommonActions.navigate(), but that's not working. Am I missing something here? I want to do all of the na...
Dewaynedewberry asked 4/9, 2020 at 20:11

3

In my rest API backend I do heavy processing and usually, it takes 1.5 minutes to produce a result, in that time I'm getting this error in my frontend react application. Error: timeout of 60000ms ...
Sweat asked 8/3, 2019 at 10:26

5

Solved

My folder structure: |--App |--Components |--PageA.js |--PageB.js |--PageC.js |--common-effects |--useFetching.js I am refactoring my code to fetch data from API, using react hooks. I want...
Brucine asked 28/2, 2019 at 16:28

2

I created a recordSaga function, its target is to record what actions have been dispatched during the saga. export const recordSaga = async (saga, initialAction, state) => { const dispatched =...
Quintessence asked 7/5, 2019 at 18:42

1

In a reactive native application which is using a redux-saga architecture plus axios, I want to intercept 401 requests and dispatch an action which sends me to a login screen. So in my axios clien...
Yasmin asked 19/5, 2019 at 17:12

2

I've a login page with HOC I pass component which must render be after successful login. Here, if I check for isLoggedIn and redirect in render of sigin-in for then I get error err: Invariant ...
Heist asked 17/5, 2019 at 10:5

2

Solved

I am trying to zip a list of files before sending out through the http request. But I got stuck here. export default function zipTargetFiles(files) { if (files.length <= 1) { return files; ...
Mooned asked 18/10, 2018 at 21:15

0

Hi i am configuring redux store and i need make somethink like this import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit' import createSagaMiddleware from 'redux-saga' import log...
Woody asked 30/3, 2020 at 21:43

2

I am not able to figure out from the documentation how to start a redux saga watcher using runSaga. Suppose I have the following in saga.js: export function* fetchJokeSaga(action) { try { const ...
Brackish asked 9/9, 2019 at 17:26

1

I finished coding a React app created using the create-react-app (CSR) but I'm now rewriting this entire app using the Next.js framework for better SEO performance. While rewriting it I had some h...

5

Goal: when loading a react-router route, dispatch a Redux action requesting asynchronic Saga worker to fetch data for the underlying stateless component of that route. Problem: stateless component...
English asked 29/9, 2016 at 4:31

2

I want to load a set of data from an api using redux-saga but I can't find an example of how to do this when navigating to a new route (eg /posts) before rendering the route. How would I do this? ...
Cowley asked 19/6, 2016 at 12:52

4

Solved

I'm using redux-saga in my project. I used redux-thunk before, so i can't setState ends of some async request. like this.props.thunkAsync() .then(){ this.setState({ '' }); } Since thunk retu...
Befool asked 22/11, 2017 at 4:48

2

Solved

I would like to know why the function gets called multiple times wheh dispatch. Also, is there any better way to do, getData = (value) =>{ const body = { value: value, cn: "TH" } return bod...
Several asked 15/1, 2020 at 3:28

1

I have a basic component which displays list of users, when component is mounted I am using useEffect to make an API call which will load the data, while data is loading I want to show loader in th...
Stayathome asked 14/1, 2020 at 14:32

2

Solved

I would like to redirect to a new page after successful login. The routes (V4) are used like this: import { browserHistory } from '....browser_history_signleton'; ... class App extends Component ...
Pitman asked 19/3, 2017 at 22:39

2

Solved

I'm using redux-saga to fetch server api data. My question is that I'm trying to design following code. However yield put(get01Action(members)); which is commented out has following Syntax error. ...
Headlock asked 27/12, 2019 at 9:36

1

Solved

I have a saga which is listening to an action. And when this action is dispatched it performs a blocking call. The problem is that a lot of actions (same actions) are dispatched in the same time a...
Estovers asked 21/11, 2019 at 11:3

© 2022 - 2024 — McMap. All rights reserved.