0.2.5 • Published 1 year ago
@criteria/file-system-react v0.2.5
@criteria/file-system-react
React hooks for working with the File System API.
Getting Started
Get all file handles within the origin private file system (OPFS), including the root directory handle:
import { useFileSystem } from "@criteria/file-system-react";
function Component() {
const handlesByPath = useFileSystem();
return (
<ul>
{Object.entries(handlesByPath).map(([path, handle]) => (
<li key={path}>{path}</li>
))}
<ul>
);
}