The easiest way to publish your React component to NPM with Typescript

Benefits of publishing your own react components to NPM.

why you consider publishing components

Use my git template repository

template git repository
new repository

git clone https://github.com/tofusoup429/components-in-loading.git

Install Dependencies

yarn install

Make changes

package.json
rotatingText.tsx
index.ts

Build

yarn build

package.json
tsconfig.json
dist

Publish

yarn publish

package.json
error in publishing
package.json
it works.

Test

Component Published Tested

Summary

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store