Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32105ea

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

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎src/GoogleApiComponent.js

Copy file name to clipboardExpand all lines: src/GoogleApiComponent.js
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.