Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/criteria-labs/file-system-react

React hooks for working with the File System API.
https://github.com/criteria-labs/file-system-react

Last synced: 1 day ago
JSON representation

React hooks for working with the File System API.

Awesome Lists containing this project

README

        

# @criteria/file-system-react

React hooks for working with the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).

## Getting Started

Get all file handles within the [origin private file system (OPFS)](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system), including the root directory handle:

```tsx
import { useFileSystem } from "@criteria/file-system-react";

function Component() {
const handlesByPath = useFileSystem();

return (


    {handlesByPath.map((handle, path) => (
  • {path}

  • ))}

      );
      }
      ```