Skip to content
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

v6 high order components problem #874

Closed
gabrielenosso opened this issue Apr 27, 2016 · 5 comments
Closed

v6 high order components problem #874

gabrielenosso opened this issue Apr 27, 2016 · 5 comments
Milestone

Comments

@gabrielenosso
Copy link

gabrielenosso commented Apr 27, 2016

Hi, with the v6 version, I have problems using a redux-form with the redux "connect".

Practically if I use 2 high order components (one for the redux store using "connect" and one for redux-form using "reduxForm"), it doesn't work if I use redux-for as the first one.
But it works if I use it as the second one (It was working in previous versions).

The following code doesn't work (the component is not updated when the state.data object is updated in the redux store)

const MyComponentForm = reduxForm({
  form: 'eventsFilter'   // Unique name for this form (to register it in the Redux global store)
})(MyComponent);

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(MyComponentForm);

While the following code works:

const MyComponentConnect = connect(
  mapStateToProps,
  mapDispatchToProps
)(MyComponent);

export default reduxForm({
  form: 'eventsFilter'   // Unique name for this form (to register it in the Redux global store)
})(MyComponentConnect);
@erikras
Copy link
Member

erikras commented Apr 27, 2016

Hmmm.. it's working in the example.

I'd need to see the code of your mapStateToProps and mapDispatchToProps functions to help further.

@ooflorent ooflorent modified the milestone: next-6.0.0 Apr 28, 2016
@gabrielecirulli
Copy link
Contributor

While browsing I found this might be related to the issue I just reported as well: #906

@mykyta-shulipa
Copy link
Contributor

mykyta-shulipa commented May 10, 2016

seems to be fixes in v6.0.0-alpha-7, as commented in #906

@erikras
Copy link
Member

erikras commented May 10, 2016

Closing based on @nktssh's comment.

@erikras erikras closed this as completed May 10, 2016
@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants