Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>
        ))}
    </>
  );
};

About

Basic react hook and some utils for Shadow Drive

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages