# @andrewsantarin/react-component-lib

> This is a boilerplate repository for creating npm packages with React components written in TypeScript and using styled-components.

Latest version **1.0.0** (published 2019-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @andrewsantarin/react-component-lib
pnpm add @andrewsantarin/react-component-lib
yarn add @andrewsantarin/react-component-lib
bun add @andrewsantarin/react-component-lib
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-09 |
| First published | 2019-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 74 |
| Maintainers | andrewsantarin |

## Links

- npm: https://www.npmjs.com/package/@andrewsantarin/react-component-lib
- Repository: https://github.com/michal-wrzosek/react-component-lib
- Homepage: https://github.com/michal-wrzosek/react-component-lib#readme
- Issues: https://github.com/michal-wrzosek/react-component-lib/issues
- npm.io page: https://npm.io/package/@andrewsantarin/react-component-lib

## Recent versions

- 1.0.0 (latest) — 2019-06-09

## README

# react-component-lib

This is a boilerplate repository for creating npm packages with React components written in TypeScript and using styled-components.

Medium article explaining step by step how to use this repo to publish your own library to NPM:
https://medium.com/@xfor/developing-publishing-react-component-library-to-npm-styled-components-typescript-cc8274305f5a

## Installation:

To install all dependencies run `npm run install-all`.

## Developing your library:

To start developing your library, run `npm run dev`. It will build your library and run example create-react-app where you can test your components. Each time you make changes to your library or example app, app will be reloaded to reflect your changes.

## Styled-components:

Developing library with components built with styled-components is challenging because you have to keep only one instance of styled-components. If you would just symlink your library (`file:../` or `npm link`) to example app that is also using styled-components you'll get a console warning about multiple instances of styled-components (even though styled-components are peer dependency) and your styles will be possibly broken. To be able to conveniently develop styled components I am injecting bundled files directly into example app's /src folder and importing it in App.tsx along with type declaration.

## Typescript

This boilerplate lets you develop your libraries in Typescript and you can simultaneously test it in Typescript example create-react-app.

---
_Source: https://npm.io/package/@andrewsantarin/react-component-lib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
