Skip to main content

Questions tagged [redux-saga]

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

"Fetch the data if it doesn't exist" selector?

Let's say I have a react component like this: const MyComponent = ({data}) => (<div>{JSON.stringify(data)}</div>); const myReduxSelector = (state, id) => state.someData[id]; ...
dwjohnston's user avatar
  • 2,677
1 vote
2 answers
1k views

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. ...
dwjohnston's user avatar
  • 2,677
5 votes
1 answer
7k views

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. ...
dwjohnston's user avatar
  • 2,677