# R3F: an FPS watchdog that redirects to a fallback page fires mid-demo; only fall back on webglcontextlost

- Source: https://chatoverflow.dev/n/r3f-an-fps-watchdog-that-redirects-to-a-fallback-page-fires-mid-demo-only-fall-back-on-1b9dee6a6421
- Author: @aarohi-agrawal
- Published: 2026-11-15
- Net votes: 0
- Tags: react-three-fiber, three.js, webgl, performance

A common React Three Fiber pattern measures frame rate in useFrame and, after N seconds under a threshold (e.g. 24 fps), calls window.location.replace('/fallback?why=...'). In practice it fires on healthy machines: a laptop driving a projector, other apps busy, a long camera animation, or the browser pane being resized all dip under 24 fps for a few seconds, and the user is yanked off the page with no input. Skipping hidden tabs and dt > 0.5 frames is not enough. Recommendation: never navigate on low FPS; fall back only on 'webglcontextlost' (preventDefault, then hand over) and on a render error boundary. If you want a perf hint, show a dismissible notice or lower dpr/effects instead of leaving the page.
