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

@javff/wayu-pay-react

v1.0.0

Published

React component library for Wayu Pay flow

Readme

Wayu Pay React Component Library

This library provides reusable React components for the Wayu Pay payment flow user interface. It is designed to be published and consumed as an NPM package.

Development

This project uses React, TypeScript, Vite (for building the library), and Storybook (for component development and visualization).

Prerequisites

  • Node.js (LTS version recommended)
  • npm (or yarn)

Installation (for Development)

  1. Clone the repository.
  2. Navigate to the project directory:
    cd wayu-pay-react-js 
  3. Install the development dependencies:
    npm install 
    (or yarn install)

Running Storybook

To view and develop components in isolation, run Storybook:

npm run storybook

This will open Storybook in your browser (usually at http://localhost:6006 or an alternative port if 6006 is busy).

Building the Library

To generate the distributable files for the library (which can then be published to npm), run:

npm run build

This will generate the compiled files (in ES and UMD formats) and the type declaration files (.d.ts) in the dist/ directory.

Project Structure

  • .storybook/: Storybook configuration files.
  • dist/: Build output directory (ignored by git). This contains the files that are published to NPM.
  • node_modules/: Project dependencies (ignored by git).
  • src/: Library source code.
    • components/: Public components exported by the library.
      • ComponentName/: Specific folder for each public component (contains code, styles, story).
    • internal/: Sub-components or internal logic used by public components (not exported).
      • ComponentName/: Sub-components specific to a public component.
    • css-modules.d.ts: Type declarations for CSS modules.
    • index.ts: Main entry point that exports the public components.
  • .gitignore: Files and folders ignored by git.
  • package.json: Project metadata, dependencies, and publishing configuration for NPM.
  • README.md: This file.
  • tsconfig.json: TypeScript configuration.
  • vite.config.ts: Vite configuration.
  • vite-env.d.ts: Vite type declarations.

Using the Library (Example)

Once the library is published to NPM (e.g., as wayu-pay-react), it can be used in another React project as follows:

  1. Install the package:

    npm install wayu-pay-react

    (or yarn add wayu-pay-react)

  2. Import and use the component:

import React from 'react';
// Assuming 'WayuPaymentFlow' is the main component exported
import { WayuPaymentFlow } from 'wayu-pay-react'; 
// Import the base styles if necessary (depends on build configuration)
// import 'wayu-pay-react/dist/style.css'; 

function MyApp() {

  const handleComplete = (data) => {
    console.log('Payment completed:', data);
    // Process the data returned by the flow
  };

  const handleError = (error) => {
    console.error('Error during payment flow:', error);
    // Handle the error appropriately
  };

  return (
    <div>
      <h1>Initiate Payment</h1>
      <WayuPaymentFlow
        transactionId="your-unique-transaction-id" 
        onComplete={handleComplete}
        onError={handleError}
        // Add other necessary props for the component
      />
    </div>
  );
}

export default MyApp;

Make sure to check the library's documentation or index.ts for the exact names of exported components and required props.