@criteria/file-system-react
v0.2.5
Published
React hooks for working with the File System API.
Downloads
4
Maintainers
Keywords
Readme
@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>
);
}