Skip to content

Commit

Permalink
feat(GoogleMapLoader): switch to new behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Aug 4, 2016
1 parent 041ea06 commit 7e40269
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/GoogleMapLoader.js
Expand Up @@ -6,18 +6,22 @@ import {
Component,
} from "react";

import {
default as propTypesElementOfType,
} from "react-prop-types-element-of-type";

import {
default as GoogleMap,
} from "./GoogleMap";

import {
default as GoogleMapHolder,
} from "./creators/GoogleMapHolder";

const USE_NEW_BEHAVIOR_TAG_NAME = `__new_behavior__`;/* CIRCULAR_DEPENDENCY */

export default class GoogleMapLoader extends Component {
static propTypes = {
containerElement: PropTypes.node.isRequired,
/* CIRCULAR_DEPENDENCY. Uncomment when 5.0.0 comes:
propTypesElementOfType(GoogleMap).isRequired, */
googleMapElement: PropTypes.element.isRequired,
googleMapElement: propTypesElementOfType(GoogleMap).isRequired,
};

static defaultProps = {
Expand Down Expand Up @@ -55,8 +59,6 @@ export default class GoogleMapLoader extends Component {
//
return React.cloneElement(this.props.googleMapElement, {
map: this.state.map,
// ------------ Deprecated ------------
containerTagName: USE_NEW_BEHAVIOR_TAG_NAME,
});
}
}
Expand Down

0 comments on commit 7e40269

Please sign in to comment.