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

@guanghechen/react-confetti

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

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
Source
npmnpm
Version published
Weekly downloads
6
-68.42%
Maintainers
0
Weekly downloads
 
Created
Source

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

Keywords

confetti

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