@innocuous/components
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Innocuous > Components

A set of harmless React components.

This component library was bootstrapped using tsdx.

Build Status

Installation

yarn add @innocuous/components

Commands

The recommended workflow is to run TSDX in one terminal:

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

Then run the example inside another:

cd example
yarn # install dependencies
yarn start

The default example imports and live reloads whatever is in /dist, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. No symlinking required, we use Parcel's aliasing.

To do a one-off build, use yarn build.

To run tests, use yarn test.

Optimizations

Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:

// ./types/index.d.ts
declare var __DEV__: boolean;

// inside your code...
if (__DEV__) {
  console.log('foo');
}

Using the Playground

cd example
yarn # install dependencies
yarn start

The default example imports and live reloads whatever is in /dist, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. No symlinking required!

Named Exports

Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.

Package Sidebar

Install

npm i @innocuous/components

Weekly Downloads

50

Version

2.1.1

License

MIT

Unpacked Size

30.4 kB

Total Files

18

Last publish

Collaborators

  • allenanthes
  • juliantrueflynn
  • kylemh