high90%
Docs: Preserving UI State guide missing warning for imperative DOM/WebGL libraries (Mapbox GL, Three.js, etc.)
Next.js documentation's Preserving UI State guide lacks a warning about imperative DOM/WebGL libraries like Mapbox GL and Three.js, which destroy internal DOM references during effect cleanup. When routes reappear, effects re-run but the library instance is already destroyed, causing a TypeError only in production builds. The fix is to remount the library from scratch instead of reusing stale instances.
