/upower

Any React Component Library

Primary LanguageTypeScriptMIT LicenseMIT

upower

NPM version Build npm-typescript License

It is simple React counter.

Live Demo

Installation:

npm install upower --save-dev

or

yarn add -D upower

Usage :

Add MyCounter to your component:

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

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>,
)