Comments (11)
Also experiencing this, with a solid reproduction path, it happens predictably when NextJS 8.1.0 hot reloads.
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in LoadScript (at Map.tsx:87)
in Map (at TripDetailsMap.tsx:94)
in section (created by Context.Consumer)
in StyledComponent (created by TripDetailsMap__InnerWrapper)
Update: I switched from <LoadScript />
to <LoadScriptNext />
and switched to the React Hooks API and I no longer experience this problem. I'll update further if it resurfaces.
from react-google-maps-api.
Hi @MiguelGPereira. Thanks a lot for the super detailed bug report.
I'll look into it in the next couple of days
from react-google-maps-api.
@MiguelGPereira please check new @react-google-maps/[email protected]
version. It should resolve your error.
from react-google-maps-api.
@nojaf unfortunately not, we ended up migrating to mapbox and react-map-gl
from react-google-maps-api.
UPDATE: I managed to reproduce this problem without lazy loading, so it might not be solely related to that. However, lazy loading makes this problem easier to reproduce, without lazy loading is considerably harder. I'll update the title and the description accordingly.
from react-google-maps-api.
@MiguelGPereira I've tested your codesandbox example with @1.0.10, and it seems there is no issue
from react-google-maps-api.
@JustFly1984 I updated to the new version but the problem still occurs, although it looks harder to reproduce. But even in the codesandbox w/@1.0.10 it still happens, try a few times clicking fast between Refresh and Map OFF, and you'll see the Warning: Can't perform a React state update on an unmounted component in LoadScript
in the console. You might want to add an API_KEY to the const in "map.js" so the error You have exceeded your request quota for this API
doesn't appear first.
from react-google-maps-api.
Hi @mpgon I'm having the same error react-dom.development.js?7f13:546 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in LoadScript
Were you ever able to solve this?
from react-google-maps-api.
@uriklar mention
from react-google-maps-api.
considering issue closed
from react-google-maps-api.
@ostenning i am still experiencing the same issue even when switching to LoadScriptNext. Could you expand on what you "switched" to the react hooks API? Im not really sure what I should switch to it?
from react-google-maps-api.
Related Issues (20)
- React Error: Maximum update depth exceeded after navigating back & forth with useJsApiLoader
- Site with a description of API does not work HOT 5
- how to disable map zoom when DirectionsRenderer redraws the path HOT 1
- onLoad prop return type error, but the map loads correctly
- MarkerClusterer onClick event doesn't have default click event params
- Custom controls
- Autocomplete not working on android browser, after useJsApiLoader execute the isLoaded not turned to true
- Doc link is broken HOT 4
- Document link is broken HOT 2
- Doc site not working HOT 1
- Right click doesn't work in InfoBox component HOT 2
- Loading google maps JS API HOT 7
- This page can't load Google Maps correctly. For developmental purposes only.
- Docs link broken HOT 3
- Marker will be discontinued on February 21, 2024. Please use google.maps.marker.AdvancedMarkerElement instead. For more information about the end of support, please visit https://developers.google.com/maps/deprecations. HOT 14
- Marker Icon Misalignment with Custom SVG Path in @react-google-maps/api
- 21st, 2024, google.maps.Marker is deprecated. HOT 7
- Docs website seems to be down HOT 5
- documentation website become gambling ads HOT 1
- README netlify link is showing scam games HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-google-maps-api.