Skip to content

Commit 51ed1fa

Browse files
committed
fix: move Date.now() out of render to satisfy React 19 purity rule
Made-with: Cursor
1 parent 581cf05 commit 51ed1fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/TheMirror.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useState, useEffect, useRef } from 'react';
55
export default function TheMirror() {
66
const [counts, setCounts] = useState({ confessions: 0, couples: 0, battles: 0, agents: 0 });
77
const [seconds, setSeconds] = useState(0);
8-
const startRef = useRef(Date.now());
8+
const startRef = useRef(0);
99
const intervalRef = useRef<ReturnType<typeof setInterval>>(undefined);
1010

1111
useEffect(() => {

0 commit comments

Comments
 (0)