Skip to content

Instantly share code, notes, and snippets.

View zxs-1024's full-sized avatar
🌴
I may be slow to respond.

张小手 zxs-1024

🌴
I may be slow to respond.
  • null
  • 上海
View GitHub Profile
@zxs-1024
zxs-1024 / app.js
Last active June 28, 2023 02:36 — forked from inorganik/app.js
Using CountUp.js in React
import { useEffect, useRef } from 'react'
// playground: https://stackblitz.com/edit/react-ts-nv5fxe?file=App.tsx
export default function App() {
// create a ref and declare an instance for each countUp animation
const countupRef = useRef(null);
let countUpAnim;