Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linksplatform/react-deep-tree
https://github.com/linksplatform/react-deep-tree
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/linksplatform/react-deep-tree
- Owner: linksplatform
- License: unlicense
- Created: 2020-08-19T12:26:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T12:14:43.000Z (3 months ago)
- Last Synced: 2024-10-19T22:08:50.897Z (3 months ago)
- Language: TypeScript
- Size: 1.52 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-deep-tree
An attempt to make traversing trees with deep-deep structure user-friendly. Started as a part of our [UI prototype](https://github.com/linksplatform/InfiniteDepthTreeWebUIPrototype).
## Install
```Shell
npm i react-deep-tree
```## [Use](https://codesandbox.io/s/intelligent-bird-j5vit)
```JavaScript
import React from "react";
import DeepTree from "react-deep-tree";
import type { DataNode } from "react-deep-tree";const data : DataNode[] = [
{
content: 'Text of a first level of the first element',
children: [
{
content: 'Text of a second level of the first element',
children: [],
},
{
content: 'Text of a second level of the first element',
children: [],
},
],
},
{
content: 'Text of a first level of the second element',
children: [
{
content: 'Text of a second level of the second element',
children: [],
},
{
content: 'Text of a second level of the second element',
children: [],
},
],
},
];export default function App() {
return ;
}
```