MCPcopy Create free account
hub / github.com/tomchentw/react-google-maps / withGoogleMap

Function withGoogleMap

lib/withGoogleMap.js:70–203  ·  view source on GitHub ↗
(BaseComponent)

Source from the content-addressed store, hash-verified

68
69/* global google */
70function withGoogleMap(BaseComponent) {
71 var factory = _react2.default.createFactory(BaseComponent)
72
73 var Container = (function(_React$PureComponent) {
74 ;(0, _inherits3.default)(Container, _React$PureComponent)
75
76 function Container() {
77 var _ref
78
79 var _temp, _this, _ret
80
81 ;(0, _classCallCheck3.default)(this, Container)
82
83 for (
84 var _len = arguments.length, args = Array(_len), _key = 0;
85 _key < _len;
86 _key++
87 ) {
88 args[_key] = arguments[_key]
89 }
90
91 return (
92 (_ret = ((_temp = ((_this = (0, _possibleConstructorReturn3.default)(
93 this,
94 (_ref =
95 Container.__proto__ ||
96 (0, _getPrototypeOf2.default)(Container)).call.apply(
97 _ref,
98 [this].concat(args)
99 )
100 )),
101 _this)),
102 (_this.state = {
103 map: null,
104 }),
105 (_this.handleComponentMount = (0, _bind3.default)(
106 _this.handleComponentMount,
107 _this
108 )),
109 _temp)),
110 (0, _possibleConstructorReturn3.default)(_this, _ret)
111 )
112 }
113
114 ;(0, _createClass3.default)(Container, [
115 {
116 key: "getChildContext",
117 value: function getChildContext() {
118 return (0, _defineProperty3.default)(
119 {},
120 _constants.MAP,
121 this.state.map
122 )
123 },
124 },
125 {
126 key: "componentWillMount",
127 value: function componentWillMount() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected