redux-saga Questions

3

enter image description here Code: this is my index.js file index.js import { Provider } from "react-redux"; import { createStore } from 'redux'; import App from './app'; import reducer fr...

4

Solved

I am trying to follow this code in redux-saga export const getUser = (state, login) => state.entities.users[login] export const getRepo = (state, fullName) => state.entities.repos[fullName] ...
Strained asked 30/7, 2016 at 12:55

3

I'm still fairly new to Redux and have not used Redux Sagas, so I'm unsure whats a good situation to start using Sagas. Or other solutions. The current use case is: I have a Redux action that...
Stakeout asked 17/4, 2018 at 14:34

2

Solved

Assuming I have a function function* request(url) { return global.fetch(url).then(response => _.result(response, 'json')) } Both code examples work fine to me const {data} = yield call(req...
Actino asked 24/11, 2018 at 23:0

2

Solved

everyone. I test saga with jest framework. I can test my saga in normal situation. But I want to test the code in catch(), so I have to mock a error to trigger catch. I find some solution in redux-...
Goldia asked 23/3, 2018 at 7:33

2

Solved

I'm very new to redux-saga and am reading through the documentation. One of the things I'm not understanding is what, specifically, the API calls return. When I say "return", I suppose I'm asking...
Witting asked 23/11, 2018 at 17:32

1

Solved

I just got into redux-saga and I'm a bit confused on Watchers and Generators Take for example this code below, that is the entry-point of my sagas file function* employeesSaga() { yield all([ t...
Hootenanny asked 16/11, 2018 at 6:1

1

Solved

I have a Saga like so (some pseudocodish). Saga1 calls an API. Based on the result, I need to call two further APIs. If all the APIs succeed, I call onSuccess, else onFailure. The code seems to a...
Acanthus asked 30/10, 2018 at 19:30

2

Solved

I have the following scenario: export function* addCircle(circleApi, { payload }) { try { const response = yield apply( circleApi, circleApi.addCircle, [payload] ); if (response.error_type...
Pearlpearla asked 12/10, 2018 at 21:38

2

Solved

I'm trying to use redux saga library to capture some actions but I'm having this error when I run the app: index.js:2178 uncaught at rootSaga at rootSaga at projectSaga at watchFetchRequest at ...
Martian asked 5/10, 2018 at 15:48

1

Solved

My Saga Root looks like this export default function* root() { yield takeLatest(LOAD_SEARCHRESULTS, getSearchResults); } it watches LOAD_SEARCHRESULTS action and then calls getSearchResults fun...
Beadruby asked 4/10, 2018 at 19:30

3

Solved

I try to handle Unauthorized error from server using redux-saga. This is my saga: function* logIn(action) { try { const user = yield call(Api.logIn, action); yield put({type: types.LOG_IN_SUCCE...
Raneeraney asked 12/10, 2016 at 20:38

1

Solved

I'm trying to use ES javascript api to get data from Elastic Search and show it in my React Redux Redux-Saga code. function* getData() { const response = async () => await client.msearch({ bo...
Myriagram asked 21/8, 2018 at 15:16

1

I have a saga of the form: export function* apiRequest(apiBaseUrl, action) { const axiosInst = getAxiosInst(apiBaseUrl); try { if (!action.serviceName) { throw new Error("No service name prov...
Kendy asked 19/8, 2018 at 22:58

2

Solved

Within a redux saga I am sending a half dozen fetch requests to different systems. I want to wait until all those requests return, then do some final processing on the results. To this end I have ...
Confluence asked 15/8, 2018 at 13:17

3

Solved

I have a project structure like this: app/ global/ styles/ components/ scenes/ Home/ actions.js constants.js index.jsx reducer.js sagas.js styles.styl index.spec.jsx some-other-scene...

1

Solved

I'm sorry for the stupid question, I'm learning React so I'm not expert at all. I'm wondering if there is a way to extend my stateless components with some functionalities without creating always ...
Dysphemia asked 2/10, 2017 at 12:1

1

I'd like to run parallel effects with redux-saga, without throwing if an error happens. Using the all effect from redux-saga, if: One of the Effects was rejected before all the effects complete...
Janniejanos asked 25/6, 2018 at 11:32

1

Solved

I've seen sagas listening for actions in 3 ways: 1. while(true) take() function* onUserDetailsRequest() { while(true) { const { userId } = yield take(USER_DETAILS_REQUESTED); const response = ...
Rezzani asked 20/12, 2017 at 15:25

1

I am building react-native app, where I use react-native-firebase and redux-saga. This is my first project using redux-saga, hence I am learning. So far I got the authentication of the user using t...
Parang asked 3/6, 2018 at 17:11

1

Is there a way to do a leading debounce? The example on the recipes only shows a trailing debounce. So below is trailing debounce example where we delay the logic fro 500ms: import { call, cance...
Durkin asked 23/5, 2018 at 13:2

1

Solved

The demonstration example in the README file uses a function called put() instead of dispatch() in the worker saga. ... // worker Saga: will be fired on USER_FETCH_REQUESTED actions function* fet...
Kelci asked 24/5, 2018 at 9:44

1

I am working on a React isomorphic app that uses redux and redux-saga. My problem is that the node process that runs the app takes more and more memory as requests get processed, until it eventuall...
Petrolatum asked 9/5, 2018 at 14:46

1

Solved

My identityserver4 client looks like this: new Client { ClientId = "openIdConnectClient", ClientName = "Example Implicit Client Application", //AllowedGrantTypes = GrantTypes.Implicit, Allowed...

3

Solved

I'm trying to make a simple react-native app with redux and redux-saga tie-ins. Unfortunately, when I try to run the app (whether using react-native run-ios or running through Xcode, I get the foll...
Lime asked 13/6, 2016 at 19:1

© 2022 - 2024 — McMap. All rights reserved.