2.1.8 • Published 9 months ago

@poolzfinance/reacthelper v2.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

ReactHelper

Reporting Bugs / Feature Requests

Open Bugs Feature Requests Closed Issues

Coverage Bugs Security Rating Code Smells Quality Gate Status Duplicated Lines (%)

Installation

You can install the package either using NPM or using Yarn

Using NPM

npm install @poolzfinance/reacthelper

Yarn

yarn add @poolzfinance/reacthelper

Usage

src/index.tsx

import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
import { ThePoolzProvider } from "@poolzfinance/reacthelper"
import App from "./App"

const rootElement = document.getElementById("root")
const root = createRoot(rootElement!)

root.render(
  <StrictMode>
    <ThePoolzProvider>
      <App />
    </ThePoolzProvider>
  </StrictMode>
)

Connect MetaMask wallet

src/App.tsx

import { useThePoolz, useConnectWallet } from "@poolzfinance/reacthelper"

export default function App() {
  const thePoolz = useThePoolz()
  const { account } = thePoolz
  const { isMetamask, connectMetamask } = useConnectWallet()

  return (
    <div>
      <h1>ReactHelper</h1>
      {account || (
        <button
          onClick={async () => {
            try {
              await connectMetamask()
            } catch (error) {
              console.error(error)
            }
          }}>
          {!isMetamask && "Install"} Metamask
        </button>
      )}
    </div>
  )
}

Demo: SandBox

2.1.8

9 months ago

2.1.7

10 months ago

3.0.0-alpha

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.5

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.13.6-alpha1

1 year ago

1.13.4-alpha1

1 year ago

1.13.2-alpha1

1 year ago

1.13.5-alpha1

1 year ago

1.13.1-alpha1

1 year ago

1.13.3-alpha1

1 year ago

1.13.0-alpha1

1 year ago

1.12.11

1 year ago

1.12.10

1 year ago

1.12.9

1 year ago

1.12.8

1 year ago

1.12.6

1 year ago

1.12.5

1 year ago

1.12.4

1 year ago

1.12.3

1 year ago

1.12.2

1 year ago

1.12.1

2 years ago

1.12.0

2 years ago

1.11.0

2 years ago

1.8.0

2 years ago

1.9.0

2 years ago

1.10.0

2 years ago

1.7.0

2 years ago

1.37.0

2 years ago

1.34.0

2 years ago

1.35.0

2 years ago

1.36.5

2 years ago

1.38.0

2 years ago

1.39.0

2 years ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.36.6

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.42.0

2 years ago

1.41.0

2 years ago

1.40.1

2 years ago

1.6.9

2 years ago

1.6.8

2 years ago

1.6.10

2 years ago

1.6.7

2 years ago

1.6.6

2 years ago

1.6.5

2 years ago

1.25.0

2 years ago

1.26.0

2 years ago

1.23.0

2 years ago

1.24.0

2 years ago

1.29.0

2 years ago

1.19.0

2 years ago

1.18.0

2 years ago

1.27.0

2 years ago

1.28.0

2 years ago

1.32.0

2 years ago

1.21.0

2 years ago

1.33.0

2 years ago

1.22.0

2 years ago

1.30.0

2 years ago

1.31.0

2 years ago

1.20.0

2 years ago

1.17.1

2 years ago

1.17.0

2 years ago

1.16.0

2 years ago

1.14.1-29

2 years ago

1.14.0

2 years ago

1.13.0

2 years ago