0.1.22 • Published 12 months ago

react-shadow-drive-rc v0.1.22

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

React Shadow Drive

A react hook and some helpers/extra typing for GenesysGo's Shadow Drive javascript SDK.

Note: Package API subject to change often in near future

Material UI Example App

The example app was uploaded via itself to ShadowDrive. So there.

Docs

TS Docs

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

const ShadowDriveComponent: FC = () => {
  const { ready, refreshStorageAccounts, storageAccounts } = useShadowDrive();

  useEffect(() => {
    if (!ready) return;

    refreshStorageAccounts();
  }, [ready]);

  return (
    <>
      {storageAccounts &&
        storageAccounts.map(({ acccount, publicKey }) => (
          <span key={publicKey.toString()}>{account.identifier}</span>
        ))}
    </>
  );
};
0.1.20

12 months ago

0.1.21

12 months ago

0.1.22

12 months ago

0.1.19

12 months ago

0.1.18

12 months ago