If you're using this with Redux, the data prop may be taken from the redux store, in which case it will be a new array each time (not the original array mutated). This means that as elements are added and removed to the tree, the component doesn't update. To get around this, when binding a container component to the store, be sure to use a key prop to signal the change. For example:
<TreeView data={props.data} key={props.data.length === 0 ? -1 : props.data[0].id}/>