Skip to content

Commit 32105ea

Browse files
authored
Merge pull request #507 from brigadierpratap/master
UNSAFE warning for componentWillReceiveProps
2 parents fe104cd + 4e93077 commit 32105ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GoogleApiComponent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const wrapper = input => WrappedComponent => {
5555
this.mapRef=React.createRef();
5656
}
5757

58-
UNSAFE_componentWillReceiveProps(props) {
58+
componentDidUpdate(props) {
5959
// Do not update input if it's not dynamic
6060
if (typeof input !== 'function') {
6161
return;
@@ -75,11 +75,11 @@ export const wrapper = input => WrappedComponent => {
7575

7676
// Save new options in component state,
7777
// and remove information about previous API handlers
78-
this.setState({
78+
this.state= {
7979
options: options,
8080
loaded: false,
8181
google: null
82-
});
82+
};
8383
}
8484

8585
componentWillUnmount() {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy