npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

metamask-web3-react

v1.0.0

Published

[![CI](https://github.com/ma-c-kik/mac-web3-react/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/ma-c-kik/mac-web3-react/actions/workflows/CI.yml)

Downloads

5

Readme

mac-web3-react (beta)

CI

Example

Packages

| Package | Version | Size | Description | |-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------| | mac-web3-react-types | npm | minzip | | | mac-web3-react-store | npm | minzip | | | mac-web3-react-core | npm | minzip | | | Connectors | | | | | mac-web3-react-eip1193 | npm | minzip | | | mac-web3-react-empty | npm | minzip | | | mac-web3-react-metamask | npm | minzip | MetaMask | | mac-web3-react-network | npm | minzip | | | mac-web3-react-url | npm | minzip | | | mac-web3-react-walletconnect | npm | minzip | WalletConnect | | mac-web3-react-walletlink | npm | minzip | WalletLink | | Experimental Connectors | | | Not stable | | mac-web3-react-frame | npm | minzip | Frame | | mac-web3-react-magic | npm | minzip | Magic |

Getting Started

  • yarn
  • yarn bootstrap
  • yarn start

In addition to compiling each package in watch mode, this will also spin up the example app on http://localhost:3000/.

Running Tests

  • yarn test --watch

Documentation

This version of web3-react is still in beta, so unfortunately documentation is pretty sparse at the moment. The example repository and the source code itself are your best bets to get an idea of what's going on. More thorough documentation is a priority as development continues, however!

Adding Connectors

If you're interested in using web3-react with a particular wallet solution that doesn't have an "official" connector package, you're in luck! This library was specifically written to be extremely modular, and you should be able to draw inspiration from the existing connectors to write your own! That code can live inside your codebase, or even be published as a standalone package. From time to time, if there's sufficient interest and desire, PRs adding new connectors may be accepted, but it's probably worth bringing up in an issue for discussion beforehand.

Upgrading from v6

While the internals of web3-react have changed fairly dramatically between v6 and v8, the hope is that usage don't have to change too much when upgrading. Once you've migrated to the new connectors and state management patterns, you should be able to use the hooks defined in mac-web3-react-core, in particular useWeb3React, as more-or-less drop-in replacements for the v6 hooks. The big benefit in v8 is that hooks are now per-connector, as opposed to global, so no more juggling between connectors/multiple roots! Instead, you should be able to use a higher-level hook that selects amongst all connectors based on whether they're active, have errors, etc. and return the appropriate provider/account/etc. for usage elsewhere in your application.

Useful Commands

Add a dependency

  • yarn lerna add <DEPENDENCY> --scope <PACKAGE>

Remove a dependency

  • Delete the relevant package.json entry

Because of a lerna bug, it's not possible to prune yarn.lock programmatically, so regenerate it manually:

  • yarn lerna exec "rm -f yarn.lock" --scope <SUBPACKAGE>
  • yarn clean --scope <SUBPACKAGE>
  • yarn bootstrap