title: How does Material UI TreeView recursive render works?
body: <p>I'm trying to render Material UI <code>TreeView</code> dynamically, so I want to add new nodes on the node expanding event. I tried to do that, but stuck with some strange behavior. I have a json data variable with some nodes, on the node expanding I'm adding some new child nodes to that variable and pass it to my render function, but unfortunately my tree doesn't change. If I add that extra nodes in another variable in advance and render that variable on node expand, the tree does change, I can't understand why, because at the time of passing that variables to the render function, the variables have the same data. Here is my example:
  <a href="https://codesandbox.io/s/thirsty-swanson-ld8nt?file=/src/index.js" rel="nofollow noreferrer">https://codesandbox.io/s/thirsty-swanson-ld8nt?file=/src/index.js</a></p>