react-hooks-js/purity

Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions

Validation prompt

Use this to decide whether a fired diagnostic is real or a false positive.

Fires on calls to nondeterministic APIs — Math.random(), Date.now(), new Date() with no arguments, crypto.randomUUID(), performance.now() — in the synchronous body of a component or hook. False positive: the call lives inside a useEffect, event handler, or useState lazy initializer (useState(() => crypto.randomUUID()) is the recommended fix and should not trigger).

Fix prompt

Use this once validation confirms the diagnostic is real.

For values needed once per mount, use useState's lazy initializer: const [id] = useState(() => crypto.randomUUID()). For values that update over time (a clock), set state from a useEffect interval. For values needed only inside an event handler, just call the impure API directly there. Render must stay deterministic to keep hydration, memoization, and StrictMode double-invocation correct. See https://react.dev/reference/eslint-plugin-react-hooks/lints/purity