I have made a React component called Graph:
<Graph
chartOptions={{forceY: [0, 100]}}
graphData={graphData}
/>
I want to implement shouldComponentUpdate to draw the graph only when needed. I looked into using the PureRenderMixin which compares the props. However, my chartOptions is a new object with the same contents every time this code is run. I want the chartOptions to be the same object every time, so I can properly compare the props. How can I do this?