$ show frontend-collective/react-sortable-tree
react-sortable-tree is a React component library that provides a drag-and-drop sortable tree view for hierarchical data. It renders nested arrays of nodes with expand/collapse, virtualization via react-virtualized, search with highlighting, theming, and extensive callback hooks for move and visibility changes. The library is not actively maintained; the last release was in 2020, and the README explicitly disclaims maintenance. The codebase is well-architected with clean separation of concerns: pure tree-data utility functions (walk, map, insertNode, etc.) separated from React rendering, a DndManager class that wraps react-dnd, and a theming system. Despite its staleness, the core tree manipulation algorithms are high-quality and extractable for other projects. The library depends on outdated versions of React (16) and react-dnd (11), and uses react-virtualized instead of the more modern react-window.
The LLM identified 1 files worth highlighting for reuse:
A comprehensive collection of pure functions for manipulating tree data structures: depth-first traversal (walk, map), node insertion (insertNode, addNodeUnderParent), node removal (removeNode, removeNodeAtPath), node modification (changeNodeAtPath), search (find), flattening (getFlatDataFromTree), and tree reconstruction from flat data (getTreeFromFlatData). These functions are thoroughly tested, have no React dependencies, and operate on plain JavaScript objects. They can be extracted into any JavaScript project for generic tree operations without modification, demonstrating strong software engineering with clear recursion and memoization support.