Skip to solution
hardFrontend

Build a File Explorer with Nested Drag-and-Drop

1.2k views
01

Understand the problem

Build a VS Code-style file explorer tree with folders/files, expand/collapse, and nested drag-and-drop reordering.

ReactTreeDrag and DropFile ExplorerDnD
02

Attempt it yourself

Sketch your approach before reading the solution — that's what interviews test.

Nudge consolestandby

Stuck? Beam a request up — the console returns a conceptual nudge that guides your logic without spoiling the implementation.

03

Study the solution

Requirements

  • Render a tree from JSON: { id, name, type: "file"|"folder", children? } with unlimited nesting.
  • Expand/collapse folders with animation; show indentation guides and icons.
  • Drag any file/folder to reorder or move into another folder (including nesting). Prevent dropping a folder into itself/desce

Solution ready — 2 min read

Classified // press E to declassify

04

Join the discussion

Discussion (0)

Sign in to join the discussion.

No responses yet. Be the first to share what you think.

Transmission complete // awaiting log

KEEP THE
STREAK ALIVE.

Dossier 65 of 87 decoded in the Frontend Machine Coding track. One more won't hurt.

Back to track