2.3.16 • Published 9 months ago
@guanghechen/react-confetti v2.3.16
Simple confetti particle in React.
Install
npm
npm install --save @guanghechen/react-confetti
yarn
yarn add @guanghechen/react-confetti
Usage
import { useThrowRandomConfetti } from '@guanghechen/react-confetti'
import React from 'react'
const App: React.FC = () => {
const throwConfetti = useThrowRandomConfetti()
const [tick, setTick] = React.useState<number>(0)
React.useEffect(() => {
if (tick > 0) void throwConfetti()
}, [tick])
return <button onClick={() => setTick(c => c + 1)}>throw confetti</button>
}
Related
2.3.16
9 months ago
2.3.15
10 months ago
2.3.14
1 year ago
2.3.13
1 year ago
2.3.2
2 years ago
2.3.4
2 years ago
2.3.3
2 years ago
2.3.6
2 years ago
2.3.5
2 years ago
2.3.8
2 years ago
2.3.7
2 years ago
2.3.9
2 years ago
2.3.12
2 years ago
2.3.11
2 years ago
2.3.10
2 years ago
2.3.0
2 years ago
2.3.1
2 years ago
2.2.7
2 years ago
2.2.6
2 years ago
2.2.5
2 years ago
2.2.4
2 years ago
2.2.1
2 years ago
2.2.0
2 years ago
2.2.3
2 years ago
2.2.2
2 years ago
2.1.4
3 years ago
2.1.3
3 years ago