Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/criteria-labs/file-system-react
- Owner: criteria-labs
- License: mit
- Created: 2024-03-06T00:53:20.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-06T15:00:33.000Z (10 months ago)
- Last Synced: 2024-11-07T00:49:15.536Z (about 2 months ago)
- Language: TypeScript
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 (
- {path}
{handlesByPath.map((handle, path) => (
))}
);
}
```