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.

An example using a StaticTreeDataProvider looks like this:

Live Editor
SyntaxError: Unexpected token (1:8)
1 : return ()

Component Props#

The props for the UncontrolledTreeEnvironment are as follows: