In react-google-maps Try to use fitbounds in componentDidMount lifecycle but get “Can't perform a React state update on an unmounted component.”error
问题 I'm trying to follow tutorials make bounds and center the map based on all the marks when the map is first rendered. It works on the map page, however I got this error when I use back button to go to other pages. "index.js:1446 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." May I know how to solve this? Thank