0.0.24 • Published 2 years ago

@qhecuba/hector-react-hooks v0.0.24

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

hector-react-hooks

Hector React hooks

This package also installs hector-metamask and hector packages.

Install

Npm:

npm install @qhecuba/hector-react-hooks

Yarn:

yarn add @qhecuba/hector-react-hooks

Usage

const [status, connect, getWallet] = useConnect(wallets.metamask());

Example

import React from "react";
import { useConnect, wallets } from "@qhecuba/hector-react-hooks";
import { useEffect } from "react";

function App() {
    const [status, connect, getWallet] = useConnect(wallets.metamask());

    useEffect(() => {
        connect();
        getWallet();
    }, []);

    return (
        <div className="App">
            <h1>{status.isConnected ? "Connected" : "Not connected"}</h1>
            <p>Wallet: {status.wallet}</p>
            <button onClick={connect}>Connect</button>
        </div>
    );
}

export default App;
0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.12

2 years ago

0.0.11

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

0.0.6

2 years ago

0.0.5

2 years ago

0.0.5-alpha.0

2 years ago