@glow-app/glow-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@glow-app/glow-react

The @glow-app/glow-react gives you a React interface to hook up Glow with your dApp.

Installing

# npm
npm install @glow-app/glow-react

# yarn
yarn add @glow-app/glow-react

# pnpm
pnpm install @glow-app/glow-react

Usage

// Top level app component
import { GlowSignInButton, GlowProvider } from "@glow-app/glow-react";
import "@glow-app/glow-react/dist/styles.css";

const App = ({children}) => {
  return (
    <GlowProvider>
      {children}
    </GlowProvider>
  )
}

// Component rendered under <App /> in the tree
const Home = () => {
  const { user } = useGlowContext();

  return (
    <div>
      {user ? (
        <div>Signed in as {user.address}</div>
      ) : (
        <GlowSignInButton />
      )}
    </div>
  )
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.12latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.12
1.0.01
0.6.01
0.1.11
0.1.01
0.0.121
0.0.101
0.0.91
0.0.81
0.0.71

Package Sidebar

Install

npm i @glow-app/glow-react

Weekly Downloads

11

Version

1.0.1

License

none

Unpacked Size

71.2 kB

Total Files

27

Last publish

Collaborators

  • vpontis