Skip to content

Commit bf02e9e

Browse files
ryan-williamsclaude
andcommitted
Fix lint: move ref assignment into useEffect in ThreeDDemo
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2733e72 commit bf02e9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/src/routes/ThreeDDemo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function Viewer() {
4848

4949
const [azimuth, setAzimuth] = useState(() => getStored('azimuth', DEFAULTS.azimuth))
5050
const azimuthRef = useRef(azimuth)
51-
azimuthRef.current = azimuth
51+
useEffect(() => { azimuthRef.current = azimuth }, [azimuth])
5252
const [elevation, setElevation] = useState(() => getStored('elevation', DEFAULTS.elevation))
5353
const [distance, setDistance] = useState(() => getStored('distance', DEFAULTS.distance))
5454
const [roll, setRoll] = useState(() => getStored('roll', DEFAULTS.roll))

0 commit comments

Comments
 (0)