2.3.14 • Published 3 months ago

@guanghechen/react-confetti v2.3.14

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

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.14

3 months ago

2.3.13

4 months ago

2.3.2

10 months ago

2.3.4

10 months ago

2.3.3

10 months ago

2.3.6

9 months ago

2.3.5

10 months ago

2.3.8

9 months ago

2.3.7

9 months ago

2.3.9

8 months ago

2.3.12

5 months ago

2.3.11

6 months ago

2.3.10

7 months ago

2.3.0

12 months ago

2.3.1

11 months ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.1.4

2 years ago

2.1.3

2 years ago