Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitslurp/react-shadow-drive
Basic react hook and some utils for Shadow Drive
https://github.com/bitslurp/react-shadow-drive
Last synced: 3 months ago
JSON representation
Basic react hook and some utils for Shadow Drive
- Host: GitHub
- URL: https://github.com/bitslurp/react-shadow-drive
- Owner: bitslurp
- License: mit
- Created: 2022-06-02T15:17:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T22:03:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-06T18:35:45.451Z (3 months ago)
- Language: TypeScript
- Homepage: https://bitslurp.me/files
- Size: 1010 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - bitslurp/react-shadow-drive - Basic react hook and some utils for Shadow Drive (TypeScript)
README
# React Shadow Drive
A react hook and some helpers/extra typing for [GenesysGo's](https://shdw.genesysgo.com/) Shadow Drive javascript SDK.
Note: Package API subject to change often in near future
[Material UI Example App](https://bitslurp.me/files)
The example app was uploaded via itself to ShadowDrive. So there.
## Docs
[TS Docs](https://willsnowdon.github.io/react-shadow-drive/)
## Setup
### Installation
`yarn add react-shadow-drive @shadow-drive/sdk`
### Usage
Checkout the example file management app for full usage info but quick setup would look something like this
```tsx
const ShadowDriveComponent: FC = () => {
const { ready, refreshStorageAccounts, storageAccounts } = useShadowDrive();useEffect(() => {
if (!ready) return;refreshStorageAccounts();
}, [ready]);return (
<>
{storageAccounts &&
storageAccounts.map(({ acccount, publicKey }) => (
{account.identifier}
))}
>
);
};
```