0.1.18 • Published 1 year ago

react-shadow-drive v0.1.18

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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.16

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago