Linked Questions

0 votes
1 answer
88 views

I do understand Redux a bit, but I don't understand how you can put a function inside a function. import api from '../utils/api'; import { GET_PROFILE, PROFILE_ERROR } from './types'; export const ...
Ridwan Bin Monjur's user avatar
912 votes
13 answers
227k views

According to the docs, "Without middleware, Redux store only supports synchronous data flow". I don't understand why this is the case. Why can't the container component call the async API, and then ...
Stas Bichenko's user avatar
370 votes
8 answers
228k views

Say I have the following: export const SOME_ACTION = 'SOME_ACTION'; export function someAction() { return { type: SOME_ACTION, } } And in that action creator, I want to access the global ...
ffxsam's user avatar
  • 27.9k
280 votes
7 answers
209k views

is it possible to dispatch an action in a reducer itself? I have a progressbar and an audio element. The goal is to update the progressbar when the time gets updated in the audio element. But I don't ...
klanm's user avatar
  • 3,278
160 votes
2 answers
89k views

I realize this is a basic question but I had no luck finding the answer elsewhere. Is store.dispatch synchronous or asynchronous in Redux ? In case it is asynchronous is there a possibility to add a ...
ps-aux's user avatar
  • 12.2k
28 votes
3 answers
20k views

I read that Redux Thunk is the reliable way to manage asynchronous actions/request. There's nothing much about dispatching actions by other actions. How about dispatching synchronous actions? I am ...
Rafał Łyczkowski's user avatar
29 votes
3 answers
29k views

I'm pretty new to the whole react-native / redux world, so maybe this question will sound dumb :) I know that for an API call, or stuff like that, the convention is to use middleware, but is it ...
alan_langlois's user avatar
19 votes
2 answers
21k views

I'm making API requests using isomorphic fetch, and using Redux to handle my app's state. I want to handle both internet connection loss errors, and API errors, by firing off Redux actions. I have ...
Lloyd Jones's user avatar
19 votes
2 answers
5k views

I have a few ajax requests that are not directly manipulating my apps state. In a react/redux application is it necessary (or is there any benefit) to dispatch an action for these ajax requests ...
jmancherje's user avatar
  • 6,653
38 votes
1 answer
23k views

I don't understand the need for something like redux-thunk. From what I understand a thunk is a function which returns a function. The wrapped expressions and the use of middleware appear to me to do ...
micahblu's user avatar
  • 5,233
16 votes
1 answer
4k views

I have been using React , Redux since few months now. One of the most confusing part of the ecosystem is the async data flow. There are many great solutions available and choosing the right solution ...
Dishant Soni's user avatar
8 votes
5 answers
16k views

I have my redux state like this: { parks: [ { _id:"ad1esdad", fullName : "Some Name" }, { _id:"ad1es3s", fullName : "Some Name2" } ], parkInfo: { id ...
Sanjeev Malagi's user avatar
2 votes
4 answers
8k views

I want to dispatch an action to update my application's global state with the currently signed in user. When a user clicks a button, an event handler fires that is registered in mapDispatchToProps, ...
robskrob's user avatar
  • 3,060
1 vote
1 answer
12k views

I'm still beginning in react and redux and now I followed this tutorial and it uses this middleware for dispatch. I was wondering how I would do another dispatch after the first one (to chain it)? I ...
index's user avatar
  • 3,689
4 votes
2 answers
3k views

Sorry for the kind of vague title. The best way to explain my question might be an example. I have a of items in redux, and the list is displayed in a react component using standard react-redux ...
bdwain's user avatar
  • 1,775

15 30 50 per page