Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commit 4e93077

Browse files
UNSAFE warning for componentWillReceiveProps
1 parent 5038ac4 commit 4e93077

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)

AltStyle によって変換されたページ (->オリジナル) /