Skip to content

Instantly share code, notes, and snippets.

@keyurparalkar
Created March 4, 2024 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keyurparalkar/d841a51525b5c10825f76d467e73351f to your computer and use it in GitHub Desktop.
Save keyurparalkar/d841a51525b5c10825f76d467e73351f to your computer and use it in GitHub Desktop.
const tree1 = {
id: "Parent 1",
name: "Parent 1",
children: [
{
id: "Child-1",
name: "Child-1",
children: [
{
id: "Inner-Child-1",
name: "Inner-Child-1",
children: [
{
id: "Inner-Inner-Child-1",
name: "Inner-Inner-Child-1",
},
],
},
{
id: "Inner-Child-2",
name: "Inner-Child-2",
},
],
},
{
id: "Child-2",
name: "Child-2",
},
],
};
<RecursiveTree tree={tree1} />;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment