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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-modules-template

v3.1.0

Published

A small react component creator

Readme

React Modules Template

Easy create new react modules with this tool

Installation

npm install -g react-modules-template

Usage

react-module <ComponentName> [--pure]

Example

react-module Login

This will generate a Folder named Login relative to your current path and three files: an empty Login.scss and another file named Login.jsx filled with starter code for exporting a module with custom css.

If you would like to generate a stateless component you can pass in the --pure flag after the componentName, this flag is optional. E.g: react-module TableRow --pure, this will generate a pure function with the name of TableRow with a corresponding style file and a test file.

Get started

Install the package globally and then run the --init command below.

react-module --init

This will step you through some configuration questions to make this package create files according to your project, in this init you can specify javascript extension, css extension and wheter or not to use ES6 classes.

Changelog

v3.1.0

Added the --pure flag to generate stateless components.

v3.0.0

Changed the main file to be named index.extension instead of componentName.extension, because I hated that I had to import it like this import component from '/component/component'. Now I can only import it like this: import component from '/component'

v2.0.0

Added functionality for a configuration file, added the --init flag when running to create the config file. Made it easier to customise to your own coding style and file structure.

v1.2.0

Added a jest .js test file, the starter code only checks that it can be rendered, but it can be filled with more!

Output

./Login
    --- index.[js|jsx]
    --- Login.test.js
    --- Login.[scss|css]