Everytime I submit a zone, It display this error \'Uncaught Error: A cross-origin error was thrown. React doesn\'t have access to the actual error object in development\' It
If it helps anyone, I had a similar issue trying to call a callback function with part of my state as the argument. My resolution was calling it after a promise for Component Did Mount. Might help someone, even though this isn't an exact solution for your code:
componentDidMount() {
const { clientId } = this.props
axios.get(`/api/getpayments/${clientId}`)
.then(response => {
this.setState({ payments: response.data })
})
.then(() => {
this.props.updateProgressBar(this.state.payments.slice())
})
}