Quantcast
Channel: getState in redux-saga? - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Alex Shwarc for getState in redux-saga?

Select effect does not help us if we in a callback functions, when code flow is not handled by Saga. In this case just pass dispatch and getState to root saga: store.runSaga(rootSaga, store.dispatch,...

View Article


Answer by Kokovin Vladislav for getState in redux-saga?

you can use select effect import {select, ...} from 'redux-saga/effects' function* deserialize( action ) { const state = yield select(); .... yield put({ type: 'DESERIALIZE_COMPLETE' }); } also you can...

View Article


getState in redux-saga?

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...

View Article

Answer by Bayu for getState in redux-saga?

In addition to the answer from @Kokovin Vladislav, if we like to use typing of Typescript, we could use "defined typed hooks" pattern introduced by redux-toolkit on this doc:...

View Article
Browsing all 4 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>