Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static _createMap(domEl, mapProps) {
warning(`undefined` !== typeof google,
`Make sure you've put a
componentWillMount() {
warning(this.shouldUseNewBehavior(),
`"async/ScriptjsLoader" is now rendering "GoogleMapLoader".
Migrate to use "GoogleMapLoader" instead.
The old behavior will be removed in next major release (5.0.0).
See https://github.com/tomchentw/react-google-maps/pull/157 for more details.`
);
if (!canUseDOM) {
return;
}
/*
* External commonjs require dependency -- begin
*/
const scriptjs = require(`scriptjs`); // eslint-disable-line global-require
/*
* External commonjs require dependency -- end
*/
const { protocol, hostname, port, pathname, query } = this.props;
static _createMap(domEl, mapProps) {
warning(`undefined` !== typeof google,
`Make sure you've put a
componentWillReceiveProps(nextProps) {
if (`production` !== process.env.NODE_ENV) {
const changedKeys = getUrlObjChangedKeys(this.props, nextProps);
warning(
changedKeys.length === 0,
`ScriptjsLoader doesn't support mutating url related props after initial render.
Changed props: %s`,
`[${changedKeys.join(`, `)}]`
);
}
}
componentWillMount() {
warning(false,
`"async/ScriptjsGoogleMap" is deprecated now and will be removed in next major release (5.0.0). Use "async/ScriptjsLoader" instead.
See https://github.com/tomchentw/react-google-maps/pull/150 for more details.`
);
}