Skip to content

Divyanlr/File-Explorer-App-ReactJS----Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ React Folder Explorer

A simple React application to simulate a file/folder explorer with nested folder structure. Users can dynamically add folders and files into any folder level.


πŸš€ Features

  • Expand/Collapse folder structure

  • Add new folders and files dynamically

  • Visual distinction between folders πŸ“‚ and files πŸ“„

  • Recursive rendering of nested items


πŸ“¦ Folder Structure

β”œβ”€β”€ public/

β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ components/

β”‚ β”‚ └── Folder.jsx # Recursive folder component

β”‚ β”œβ”€β”€ data/

β”‚ β”‚ └── folderData.js # Initial data structure

β”‚ β”œβ”€β”€ hook/

β”‚ β”‚ └── use-traverse-file.js # Logic to insert files/folders

β”‚ β”œβ”€β”€ App.css

β”‚ β”œβ”€β”€ App.jsx

β”‚ └── index.js


🧠 How It Works

πŸ”Ή The folder structure is stored in a nested object (explorer).

πŸ”Ή Folder component recursively renders its child folders/files.

πŸ”Ή use-traverse-file custom hook handles adding new files/folders by modifying the tree structure.


✨ Future Improvements

😎 Add delete and rename functionality

😎 Save data using localStorage or a backend

😎 Drag and drop to move items

😎 Search functionality

About

Created with CodeSandbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published