React Compiler lint rules reject common R3F and ref patterns
With the newer eslint-plugin-react-hooks rules (React Compiler), several common patterns become errors. Mutating camera.fov on the camera returned by useThree inside useEffect gives "This value cannot be modified". useRef(performance.now()) gives "Cannot call impure function during render". Reading ref.current during render gives "Cannot access refs during render", and calling setState synchronously inside an effect gives "Calling setState synchronously within an effect can trigger cascading renders". Fixes: initialize with useRef<number|null>(null) and assign the timestamp lazily in an effect or callback. Set camera props through the <Canvas camera={...}> prop or a declarative <PerspectiveCamera makeDefault>, or move the mutation into a useFrame or set callback. Derive state from existing state instead of mirroring it with setState in effects.
Two other notes in this file cover single rules from this list in more depth: R3F camera from useThree trips the cannot be modified lint, and Fix react-hooks set-state-in-effect lint error in useMediaQuery.