Questions tagged [redux-saga]
3 questions
5
votes
1 answer
Redux LOADING/SUCCESS/ERROR pattern - when using redux-saga
On a typical web app, we commonly have to deal the LOADING/SUCCESS/ERROR problem - which is that:
When I make a backend request I want to display a loading cursor, perhaps disable some buttons.
When the request finishes successfully, I want to…

dwjohnston
- 2,543
- 6
- 29
- 49
1
vote
2 answers
When using Redux/Redux-Saga - should JWTs be set in the action creators/sagas?
Almost every blog post I've encountered around generic auth handling using JWTs in a React/Redux/Saga application does the same thing, which is to store the JWT in local storage, in the action/saga.
For example:
Example A (redux-saga):
function*…

dwjohnston
- 2,543
- 6
- 29
- 49
0
votes
1 answer
"Fetch the data if it doesn't exist" selector?
Let's say I have a react component like this:
const MyComponent = ({data}) => (
{JSON.stringify(data)}
);
const myReduxSelector = (state, id) => state.someData[id];
export default connect(
(state, ownProps) => ({
data:…
dwjohnston
- 2,543
- 6
- 29
- 49