Every time I click the toggle button the child components re-render, how do I stop that from happening? I have a component that calls an api which populates a table when the user clicks a search button. When the table is populated and you click the toggle button it would re render the table, that should not happen as I am not navigating away from it. I already tried checking the collapse property on the nav inside shouldComponentUpdate so it return true when they are different but then the sidenav won't expand. I have tried sending the state to history.push but I got an error I don't really understand how it works. Please help this component is very good but It would be unusable for me just because of this re rendering issue.
Every time I click the toggle button the child components re-render, how do I stop that from happening? I have a component that calls an api which populates a table when the user clicks a search button. When the table is populated and you click the toggle button it would re render the table, that should not happen as I am not navigating away from it. I already tried checking the collapse property on the nav inside shouldComponentUpdate so it return true when they are different but then the sidenav won't expand. I have tried sending the state to history.push but I got an error I don't really understand how it works. Please help this component is very good but It would be unusable for me just because of this re rendering issue.