title: Reactjs - Why doesn't my MaterialUI Datatable refresh?
body: <p>So currently I'm trying to render a <code>DataTable</code> component. If I click on a button <code>Users</code>, it should render a table of my <code>Users</code>. When I click on the button <code>Devices</code>, it should render a table of my <code>Devices</code>. However, for some reason, it will only render the datatable of whichever one I click first.</p>
  
  <p>E.g. if I click <code>Devices</code>, it will render my <code>Devices</code> table. Now, when I try to navigate to my <code>Users</code> by clicking on the <code>Users</code> button, it'll still display my <code>Devices</code> datatable. </p>
  
  <p>I maintain a state inside <code>DataTable</code> and I'm updating the state with props that I pass into it. Is there a design flaw that I made that causes my <code>DataTable</code> to not render the correct data? </p>
  
  <p>Thanks for your help!</p>
  
  <p>EDIT: Upon some debugging, it seems the state isn't being updated when I click on the <code>Users</code> button</p>