reactjschart.jsrerenderchartjs-2.6.0react-chartjs-2

How do I prevent my chart from rerendering? (ReactJS)


So everytime I use setState my component rerenders. But I don't want my chart to rerender. My question is how do I prevent my chart from rerendering?


Solution

  • Create a new component for the chart. Prevent the rerender by memoizing it with Higher Order Component memo.