在重新装载时未调用 onGoogleApiLoaded — 在 componentWillUnmount 中未重置 initialized_ 和 googleApiLoadedCalled_
作者: Albertosnp创建于 2026年2月11日更新于 2026年2月11日
- mount() → mounted_ = true, setTimeout(0) queued
- unmount() → mounted_ = false → StrictMode
- mount() → mounted_ = true, setTimeout(0) queued
- 1st setTimeout fires → initMap() → initialized = true → loader.then() → checks mounted_ (may reference stale closure)
内容来源: google-map-react/google-map-react