New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite recursion occurring with middleware #1564
Comments
I would say that given their level of usage, it is very unlikely to be an issue with either Redux or Redux Thunk, and much more likely to be a subtle mistake in the app’s code. It’s hard to diagnose from the source alone. If you could publish a project reproducing the issue, that would be helpful. |
The issue is here: const mapDispatchToProps = (dispatch) => {
return dispatch;
} Just like If you supply a function, In your case, you meant to return const mapDispatchToProps = (dispatch) => {
// return dispatch;
return {dispatch};
} That will fix the problem. By the way, this is the default behavior if you don’t specify I hope this helps! |
Thank you so much for your help with this and the thorough explanation you provided! |
I'm working on a webapp that's utilizing React with Redux. I have posted a similar message at the redux-thunk Github, but I think this might possibly be a more general issue with Redux middleware. I am currently using Redux-Thunk in a manner very similar to the example found here:
http://redux.js.org/docs/advanced/ExampleRedditAPI.html
When running my app, I see the following error in Chrome:
Here's a link to my project:
https://github.com/jbri7357/redux-sample-app
The text was updated successfully, but these errors were encountered: