So I'm rendering a graph component using React and in the graph you can click on a node to get details about it. So that is basically a state change when you click on a node since it has to display additional data. But this causes the entire page to render again, even the graph. How do I prevent the entire component from rendering if some state changes?