[Chartjs]-React component wont re-render ChartJS chart with redux props

0👍

Mentioned this in a comment, but will add officially as the answer since it resolved the problem.

It looks like you may be mutating this.props.chartData somewhere in the action creator or reducer, and react is not updating as a result because this.props.chartData is still pointing to the same list (all be it longer now). I’d recommend trying Object.assign({}, state, { chartData: action.payload.slice() }); in your reducer to make a copy of the list.

Leave a comment