This example is very simple in that it is not intended to be a finished tree, rather a good starting point for a tree with some custom behavior.
This tree can have as many nested child nodes as desirable and does not have to have a root node.
View src/js/TreeData.js to see sample data structure, it needs to have some sort of way to identify the checkboxes so currently each node needs a unique id.
The checkboxes act independently of the tree. Clicking the +/− icon or the label for the tree node will toggle the children. Clicking a checkbox will activate the checkbox and if the checkbox has children, it will toggle all the children to the same state as itself. This behavior can be easily modified per your requirements for the tree.