UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
Add default value to resizeTimeout (#588)
Maxime Dehaye6966f69d19c6
diff --git a/registry/magicui/particles.tsx b/registry/magicui/particles.tsxindex ff6719ab..ffba7419 100644--- a/registry/magicui/particles.tsx+++ b/registry/magicui/particles.tsx@@ -97,7 +97,7 @@ export const Particles: React.FC<ParticlesProps> = ({const canvasSize = useRef<{ w: number; h: number }>({ w: 0, h: 0 });const dpr = typeof window !== "undefined" ? window.devicePixelRatio : 1;const rafID = useRef<number | null>(null);- const resizeTimeout = useRef<NodeJS.Timeout>();+ const resizeTimeout = useRef<NodeJS.Timeout | null>(null);useEffect(() => {if (canvasRef.current) {