Skip to content

An ES6 React component NPM package project template featuring front & back end test support, automated API docs, release management & more!

Notifications You must be signed in to change notification settings

karmaniverous/react-component-npm-package-template

Repository files navigation

React Component NPM Package Template

You wrote a sweet React component! Releasing it on NPM seems like the obvious next step. Right?

Try it. Not as easy to do from scratch as you might think.

So here's a plug-and-play NPM package template that offers the following features:

Click here for full template documentation & instructions!

If you want to create a non-React NPM package, try my regular NPM Package Template instead!

API Documentation

import { MyComponent } from '@karmaniverous/react-component-npm-package-template`;

MyComponent()

Wraps children in an h1 tag with a specified data-test-id attribute. Using lodash purely to demonstrate Babel cherry-picking.

Kind: global function
Component:
Example

<MyComponent testid="testid">Hello, world!</MyComponent>;

// <h1 data-testid="testid">Hello, world!</h1>

See more great templates and other tools on my GitHub Profile!

About

An ES6 React component NPM package project template featuring front & back end test support, automated API docs, release management & more!

Topics

Resources

Stars

Watchers

Forks

Sponsor this project