unable to set syncErrors in connect mapStateToProps
See original GitHub issuebug report
What is the current behavior?
unable to set syncErrors in connect mapStateToProps syncErrors will lost in component props. It works if I change the prop name to other than ‘syncErrors’
export default connect(state => ({
syncErrors: getFormSyncErrors('syncValidation')(state), // not working
formSyncErrors: getFormSyncErrors('syncValidation')(state), // working
}))(SyncValidationForm);
What is the expected behavior?
able to set syncErrors in connect mapStateToProps
Sandbox Link
https://codesandbox.io/s/qjm0V2n7y
What’s your environment?
tried on https://github.com/erikras/redux-form/tree/master/examples/syncValidation redux-form 6.6.3
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
unable to set syncErrors in connect mapStateToProps #2899
What is the current behavior? unable to set syncErrors in connect mapStateToProps syncErrors will lost in component props. It works if I change ......
Read more >redux-form: ordering connect and reduxForm calls - can't ...
I need to be able to access some of the props mapped into my component via mapStateToProps, in the onSubmit function from reduxForm....
Read more >Connect: Extracting Data with mapStateToProps - React Redux
As the first argument passed in to connect , mapStateToProps is used for selecting the part of the data from the store that...
Read more >Synchronous Validation Example - Redux Form
IMPORTANT: Synchronous validation happens on every change to your form data, so, if your field value is invalid, your field.error value will always...
Read more >3 ways to test mapStateToProps and mapDispatchToProps
3 ways to test mapStateToProps and mapDispatchToProps. You already know that you shouldn't actually test the result of calling connect (the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The doc here is confusing as it uses
syncErrors
as the key: https://github.com/erikras/redux-form/blob/master/docs/api/Selectors.mdsyncErrors: getFormSyncErrors('myForm')(state),
@zijian-etc Yes, just spent a day debugging this issue and all I did was follow the instructions 😃