Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

react-forest

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

react-forest

A simple React file explorer. WIP.

unpublished
npmnpm
Version
0.1.3
Version published
Weekly downloads
8
700%
Maintainers
1
Weekly downloads
 
Created
Source

react-forest

A simple React file structure viewer.

Usage:

Simply use the tag <Forest /> in a React app.

The Forest component requires a data parameter, which can either be an array of folders and files or a dictionary signifying a root folder with child elements.

All folders must have a boolean property titled folder and have it set to true. Non-empty folders should also have a property children, which should be an array of files. Files should not have a folder property, but are required to have a url property containing a link to the file. All files and folders must have a name property.

Dict Example:

{
    "name": "TestRootFolder",
    "folder": true,
    "children": [
        {
            "name": "TestFile",
            "url": "https://example.com/TestFile"
        },
        {
            "name": "TestSubFolder1",
            "folder": true,
            "children": [
                // etc
            ]
        }
    ]
}

Array Example:

[
    {
        "name": "TestFile",
        "url": "https://example.com/TestFile"
    },
    {
        "name": "TestFolder1",
        "folder": true,
        "children": [
            {
                "name": "TestFile2",
                "url": "https://example.com/TestFile2"
            }
        ]
    },
    {
        "name": "TestFolder2",
        "folder": true,
        "children": [
            // empty
        ]
    }
]

Keywords

react

FAQs

Package last updated on 06 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts