Skip to main content

Uncontrolled Environment

Using an uncontrolled environment to declare the state of your tree is mostly documented in the Get Started document. You need to declare your data by implementing a TreeDataProvider that declares how tree items can be loaded by React Complex Tree. Alternatively, you can just provide a StaticTreeDataProvider that contains a static reference to all available data.

You can read more about implementing a custom TreeDataProvider implementing a custom TreeDataProvider here, as well as more details on how to use the static tree data provider.

An example using a StaticTreeDataProvider looks like this:

Live Editor
Result
Loading...

Component Props

The props for the UncontrolledTreeEnvironment are as follows: