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

commoncomp-library

v0.1.8

Published

A library of React components created using `create-react-app`.

Readme

Getting Started with common-comp-lib

A library of React components created using create-react-app.

Steps to Create common-comp-lib

run the below commands

1.npx create-react-app commoncomp-lib

2.cd commoncomp-lib

3.remove everything from src folder

4.add src/index.js

import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( Hello World, document.getElementById('root') );

5.add src/lib

In this folder add your library components

6.Additinally add src/lib/utils

In that add isEmpty method for conditionally rendering. export const isEmpty = (value) => { return ( value === undefined || value === null || (typeof value === "object" && Object.keys(value).length === 0) || (typeof value === "string" && value.trim().length === 0) ); };

7.Install babel-cli using the command npm i babel-cli --save-dev and create a file .babelrc in the root of the project with the following contents:

{ "presets": ["@babel/preset-env", "@babel/preset-react"] }

8.Replace the build script inside package.json with the following:

"build": "NODE_ENV=production babel src/lib --out-dir dist --copy-files --ignore tests,spec.js,test.js,snapshots"

9.The command npm run build will now transpile the code inside src/lib (ignoring tests and snapshots) into the folder dist.

10.Remove the line "private": true from package.json. Also remove react-scripts, react and react-dom from dependencies, and move them to devDependencies. Additionally, you can also add react and react-dom to peerDependencies.

11.To prepare for publishing, add the following lines to package.json:

"main": "dist/index.js", "module": "dist/index.js", "files": [ "dist", "README.md" ], "repository": { "type": "git", "url": "URL_OF_YOUR_REPOSITORY" }

12.Remove the default README.md file, and create a new one with some information about the library.

13.Publish to npm!

npm publish

Installation

Run the following command: npm install commoncomp-lib

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.