diff --git a/dist/components/entity.js b/dist/components/entity.js index b05aa1a..702b267 100644 --- a/dist/components/entity.js +++ b/dist/components/entity.js @@ -39,7 +39,7 @@ exports['default'] = function (name, latLngProp, events) { this.addListeners(this.entity, events); }, - componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(nextProps) { if (!(0, _utilsCompareProps2['default'])(this.props, nextProps)) { var options = this.getOptions(nextProps); this.entity.setOptions(options); diff --git a/dist/components/gmaps.js b/dist/components/gmaps.js index 1e0c798..852cfaa 100644 --- a/dist/components/gmaps.js +++ b/dist/components/gmaps.js @@ -63,7 +63,7 @@ var Gmaps = (0, _createReactClass2['default'])({ this.removeListeners(); }, - componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps: function UNSAFE_componentWillReceiveProps(nextProps) { if (this.map && !(0, _utilsCompareProps2['default'])(this.props, nextProps)) { this.map.setOptions(_extends({}, nextProps, { center: new google.maps.LatLng(nextProps.lat, nextProps.lng) diff --git a/src/components/__tests__/gmaps-test.js b/src/components/__tests__/gmaps-test.js index 0e20a9a..18965d1 100644 --- a/src/components/__tests__/gmaps-test.js +++ b/src/components/__tests__/gmaps-test.js @@ -113,7 +113,7 @@ describe('Gmaps', () => { it('does not call `setOptions` if maps are not loaded', () => { const gmaps = TestUtils.renderIntoDocument(); expect(() => { - gmaps.componentWillReceiveProps({}); + gmaps.UNSAFE_componentWillReceiveProps({}); }).not.toThrow(); }); diff --git a/src/components/entity.js b/src/components/entity.js index ccf1be4..f9dfb87 100644 --- a/src/components/entity.js +++ b/src/components/entity.js @@ -16,7 +16,7 @@ export default (name, latLngProp, events) => { this.addListeners(this.entity, events); }, - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { if (!compareProps(this.props, nextProps)) { const options = this.getOptions(nextProps); this.entity.setOptions(options); diff --git a/src/components/gmaps.js b/src/components/gmaps.js index c0e3801..193b51a 100644 --- a/src/components/gmaps.js +++ b/src/components/gmaps.js @@ -30,7 +30,7 @@ const Gmaps = createReactClass({ this.removeListeners(); }, - componentWillReceiveProps(nextProps) { + UNSAFE_componentWillReceiveProps(nextProps) { if (this.map && !compareProps(this.props, nextProps)) { this.map.setOptions({ ...nextProps,