1.0.1 • Published 9 months ago

file-shark v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

file-shark

NPM version Build npm-typescriptLicense]github-license-url

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.

Live Demo

Installation:

npm install file-shark --save-dev

or

yarn add -D file-shark

Usage :

Add MyCounter to your component:

import React from 'react'
import ReactDOM from 'react-dom/client'
import { MyCounter } from 'file-shark'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
        <div>
            <h2>Default counter</h2>
            <MyCounter />
        </div>
        <hr />
        <div>
            <h2>Counter with predefined value</h2>
            <MyCounter value={5} />
        </div>
    </React.StrictMode>,
)
1.0.1

9 months ago

1.0.0

9 months ago