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 🙏

© 2026 – Pkg Stats / Ryan Hefner

metanet-react-prompt

v1.0.6

Published

Onboard users to the MetaNet

Readme

MetaNet React Prompt

License

The MetaNet React Prompt package is a collection of React components designed to simplify and streamline the onboarding process for users of your applications that require a MetaNet Client. It does by allowing you to choose when and how to show a prompt informing a user they are missing a MetaNet Client depending on the use cases of your application.

The informative prompts will guide them through the process of downloading and installing the correct MetaNet Client for their operating system.

Table of Contents

Features

  1. Onboarding Simplified: The MetaNet React Prompt removes the need for users to search for setup instructions for the MetaNet Client, which can be a hurdle to adoption. It allows you to ensure the client is installed and running when executing code that relies on it.
  2. MetaNet Network Handling: The component handles the different versions of your application that might exist on the MetaNet's mainnet and testnet networks, making it a powerful tool for alpha and beta testing.
  3. Customization: Customization coming soon!
  4. Native App Support: Specify links to your app's native versions on platforms like iOS and Android.

Installation

To install Babbage React Prompt:

npm install metanet-react-prompt

Usage

Wrap your app (or the part of it that requires the Babbage SDK to work) with this component. Your app will only be rendered once the Babbage MetaNet Client is running. Here is an example:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import PaymentTokenator from 'payment-tokenator'
import { DownloadButton, useMNCErrorHandler } from 'metanet-react-prompt'

const handleMNCError = useMNCErrorHandler();

// Example Button to use in custom solution when manually displaying notice
<DownloadButton variant='outlined' color='primary' hideOnMobile />

// Example autoCatcher
// Step 1: Wrap your app with the MNCErrorHandlerProvider
<MNCErrorHandlerProvider>
  <App />
</MNCErrorHandlerProvider>

// Step 2: Catch MNC errors and throw them as necessary (async func errors are not caught automatically)
useEffect(() => {
  (async () => {
    try {
      const paymentsToReceive = await paymentTokenator.listIncomingPayments()
    } catch (error: any) {
      // Are you expecting other types of errors?
      if (error.code === 'ERR_NO_METANET_IDENTITY') {
        handleMNCError(error);
      } else {
        // Handle other errors or rethrow them
      }
    }
    setLoading(false)
  })()
}, [])

Caveats

Please be aware that the Brave browser sometimes causes issues with desktop MetaNet Clients. If this occurs, the React Prompt is designed to instruct users on how to disable Brave Shields, which may impede your app's operation.

License

The code in this repository is licensed under the Open BSV License.