File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 140
140
google : null ,
141
141
options : options
142
142
} ;
143
+
144
+ _this . mapRef = _react2 . default . createRef ( ) ;
143
145
return _this ;
144
146
}
145
147
215
217
'div' ,
216
218
null ,
217
219
_react2 . default . createElement ( WrappedComponent , props ) ,
218
- _react2 . default . createElement ( 'div' , { ref : 'map' } )
220
+ _react2 . default . createElement ( 'div' , { ref : this . mapRef } )
219
221
) ;
220
222
}
221
223
} ] ) ;
Original file line number Diff line number Diff line change 156
156
lng : _this . props . initialCenter . lng
157
157
}
158
158
} ;
159
+
160
+ _this . mapRef = _react2 . default . createRef ( ) ;
159
161
return _this ;
160
162
}
161
163
233
235
234
236
var maps = google . maps ;
235
237
236
- var mapRef = this . refs . map ;
238
+ var mapRef = this . mapRef . current ;
237
239
var node = _reactDom2 . default . findDOMNode ( mapRef ) ;
238
240
var curr = this . state . currentLocation ;
239
241
var center = new maps . LatLng ( curr . lat , curr . lng ) ;
373
375
{ style : containerStyles , className : this . props . className } ,
374
376
_react2 . default . createElement (
375
377
'div' ,
376
- { style : style , ref : ( element ) => ( this . ref . map = element ) } ,
378
+ { style : style , ref : this . mapRef } ,
377
379
'Loading map...'
378
380
) ,
379
381
this . renderChildren ( )
You can’t perform that action at this time.
0 commit comments