Wondering what’s next for npm?Check out our public roadmap! »

@wismim/react-claps

1.0.5-pre.0 • Public • Published

Slim & sleak Medium like Claps component in react for client side.

CRA Usage (CSR)

import React from 'react';
import Claps from '@wismim/react-claps';
export default function () {
    return <Claps maxCount={10000} count={0} countTotal={0} onCountChange={({ count, countTotal }) => console.log(count, countTotal)}/>
}

Usage in NEXT JS (SSR)

const Claps = dynamic(() => import('@wismim/react-claps'),{ssr:false});
export default function () {
    return <Claps maxCount={10000} count={0} countTotal={0} onCountChange={({ count, countTotal }) => console.log(count, countTotal)} onMaxHit={({count}) => localStorage.setItem(`max_${blogId}`,true)}/>
}

Install

npm i @wismim/react-claps

DownloadsWeekly Downloads

17

Version

1.0.5-pre.0

License

none

Unpacked Size

30.6 kB

Total Files

15

Last publish

Collaborators

  • avatar