mapping an array in componentDidUpdate: _Error:Actions must be plain objects
问题 I could quite advanced in code. And now I'm calculating subtotal. I could calculate the subtotal of first element from detail, but my error is in componentDidUpdate. In componentDidUpdate if I execute this code, componentDidUpdate(prevProps, detail, index) { if (this.props.isSubtotal !== prevProps.isSubtotal) { this.props.dispatch( //NEED TO MAKE THE FOLLOWING LINE DYNAMIC AND NOT [0] change('bill', `detail[0].subtotal`, this.props.isSubtotal) ); } } Works with out any problem. But if I