1.0.1 • Published 2 years ago

@glow-app/glow-react v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@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>
  )
}
1.0.1

2 years ago

1.0.0

2 years ago

0.1.1

2 years ago

0.6.0

2 years ago

0.1.0

2 years ago

0.0.12

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago