You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP

@guanghechen/react-confetti

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guanghechen/react-confetti

Simple confetti particle in react.

2.3.17
latest
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created

@guanghechen/react-confetti


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>
}

FAQs

Package last updated on 07 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts