redux-saga Questions

7

Solved

I'm using redux saga & react router v6 and I want to redirect to a route from one of my sagas, is there a way to do it ?
Lyautey asked 27/1, 2022 at 15:33

2

Solved

I am trying to implement a messaging library Chatkit by Pusher in my React/Redux/redux saga app and I'm new to Redux. The code for connecting to chatkit looks like this: const chatManager = new Ch...
Momentarily asked 13/8, 2018 at 23:25

1

This occurs with React + Redux Saga application my team is working on We buy the React Isomorphic theme from Themeforest which bundles the Redux, Saga, and React Router V.4. We are now working on ...
Curtilage asked 30/1, 2018 at 4:25

4

Solved

I have a error on typescript, I'm using Redux and Saga as middleware, these is the error: No overload matches this call. The last overload gave the following error. Argument of type '"MY_EVENT...
Poucher asked 28/2, 2020 at 19:6

4

I have a saga (A) which fetches the API. This is tied with action (a). I want to trigger an action (b) which internally calls (a), waits for it to finish and then yield something. // saga A -> ...
Dwyer asked 27/6, 2017 at 21:12

3

Solved

I need to send dynamic data from my screen to action/reducer and fetch data from API with that data, but when i yield in my rootSaga i'll get an error like this: uncaught at check take(patternOr...
Micturition asked 22/1, 2018 at 9:45

11

Solved

There is a lot of talk about the latest kid in redux town right now, redux-saga/redux-saga. It uses generator functions for listening to/dispatching actions. Before I wrap my head around it, I wou...
Friseur asked 21/1, 2016 at 17:45

3

Solved

I have a store with a list of items. When my app first loads, I need to deserialize the items, as in create some in-memory objects based on the items. The items are stored in my redux store and han...
Frisbie asked 15/7, 2016 at 22:14

2

Solved

Recently I've started refactoring my React project to start using Typescript in it. I've encountered a problem with typing which I don't know how to overcome. Tech-stack: Typescript, React, Redux, ...
Sweetbread asked 31/3, 2021 at 19:16

1

Solved

dispatching action with payload, produces this typescript error: Argument of type 'string' is not assignable to parameter of type 'TakeableChannel'. Example: export default function* watchAuth() {...
Tinderbox asked 8/11, 2022 at 11:48

3

Solved

Problem In redux-saga, I am using yield delay(1000);. During my unit test, I do expect(generator.next().value).toEqual(delay(1000));. I expect the test to pass. This is my sagas.js: import { de...
Mckinney asked 13/3, 2018 at 18:11

3

Solved

I'm a semi-senior react and JavaScript developer, I've made several Universal react application. Today our CTO told me: Do you use a software architectural pattern for your application? I've no a...
Erring asked 24/7, 2018 at 19:45

2

I have a Redux saga that makes several API requests. I am using takeLatest to make sure that any previously running sagas are cancelled if a new action is fired. However this does not cancel in-fli...
Fisherman asked 11/3, 2021 at 18:7

9

Here is my code: store.js import {createStore, applyMiddleware, compose} from 'redux'; import {fromJS} from 'immutable'; import {routerMiddleware} from 'react-router-redux'; import createSagaMidd...
Hama asked 31/1, 2017 at 16:3

5

Solved

I been trying to introduce redux sagas and redux tool kit to my project. The problem I am having at the moment is that the watcher saga is not catching on the dispatched action in the takeEvery eff...
Aground asked 23/10, 2020 at 11:13

2

Using react-testing-library, the following test works: it( 'renders popular search terms, with links to search urls', () => { waitFor(() => { const popularSearch = screen.getByText( Copywr...

4

Solved

I use react-redux and redux-saga for API calls from this example. My target is to do another API calls with different urls and to use them in different pages. How to achieve that? Sagas: import {...
Auliffe asked 23/9, 2016 at 17:43

4

Solved

I want to introduce a delay in a saga (using redux-saga). How can I do this? If redux-saga provides an API, I would also be interested in how to achieve it manually. function* save({ payload }) ...
Jest asked 4/12, 2017 at 13:45

4

Solved

I'm using async/await throughout my codebase. Because of this my api calls are defined by async functions async function apiFetchFoo { return await apiCall(...); } I would like to call this fun...
Cerenkov asked 17/4, 2017 at 0:37

1

Solved

Redux-Saga, a Redux side effect manager, is said to be deprecated, and no longer being maintained. Yet, over 1 million developers download this NPM package weekly, regardless of the fact t...
Eocene asked 24/5, 2022 at 9:20

3

In redux saga if we want to handle multiple promises, we can use all (which is equivalent of Promise.all): yield all( users.map((user) => call(signUser, user)), ); function* signUser() { yiel...
Kennith asked 27/8, 2020 at 15:36

4

Solved

The user can logout himself when he/she clicks on the logout button but if the token is expired he/she cant logout because in my application, the token is used in both server side and front end. Wh...
Grannia asked 8/7, 2017 at 4:11

2

Solved

as an exercise for react-native & redux-saga, I am trying to develop a little Weather-Application. While fetching and presenting the data works just fine, I somehow struggle to pass a parameter...
Angrist asked 11/12, 2019 at 21:13

4

Solved

I've noticed that the result of a yield call effect is typed as any when used as const data = yield call(f); while f is a () => Promise<number> function. Am I missing something or is i...
Chaste asked 21/2, 2018 at 20:8

0

I am tried to use saga-toolkit package to create saga action but getting some error while dispatching, although I went to official documentation of saga-toolkit npm package but something is missing...
Indeed asked 20/3, 2022 at 8:51

© 2022 - 2024 — McMap. All rights reserved.