1.0.1 • Published 2 years ago
cosaft-ui-library v1.0.1
ui-library
This repo is the example of the article "How to create and publish React Typescript npm package with demo and automated build".
You can clone it and step by step create your own NPM package and publish it.
It is simple React counter.
Installation:
npm install cosaft-ui-library --save-devor
yarn add -D cosaft-ui-libraryUsage :
Add MyCounter to your component:
import React from 'react'
import ReactDOM from 'react-dom/client'
import { Test } from 'cosaft-ui-library'
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
<React.StrictMode>
<Test />
</React.StrictMode>,
)