@vis.gl/react-google-maps
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -668,4 +668,4 @@ (function (global, factory) { | ||
importLibrary = _useGoogleMapsApiLoad.importLibrary; | ||
return /*#__PURE__*/React__default["default"].createElement(APIProviderContext.Provider, { | ||
value: { | ||
var contextValue = React.useMemo(function () { | ||
return { | ||
mapInstances: mapInstances, | ||
@@ -678,3 +678,6 @@ addMapInstance: addMapInstance, | ||
importLibrary: importLibrary | ||
} | ||
}; | ||
}, [mapInstances, addMapInstance, removeMapInstance, clearMapInstances, status, loadedLibraries, importLibrary]); | ||
return /*#__PURE__*/React__default["default"].createElement(APIProviderContext.Provider, { | ||
value: contextValue | ||
}, children); | ||
@@ -1207,2 +1210,7 @@ }; | ||
}, [style, isDeckGlControlled]); | ||
var contextValue = React.useMemo(function () { | ||
return { | ||
map: map | ||
}; | ||
}, [map]); | ||
if (loadingStatus === APILoadingStatus.AUTH_FAILURE) { | ||
@@ -1224,5 +1232,3 @@ return /*#__PURE__*/React__default["default"].createElement("div", { | ||
} : {}), map ? /*#__PURE__*/React__default["default"].createElement(GoogleMapsContext.Provider, { | ||
value: { | ||
map: map | ||
} | ||
value: contextValue | ||
}, children) : null); | ||
@@ -1330,2 +1336,7 @@ }; | ||
contentContainer = _useAdvancedMarker[1]; | ||
var advancedMarkerContextValue = React.useMemo(function () { | ||
return marker ? { | ||
marker: marker | ||
} : null; | ||
}, [marker]); | ||
React.useImperativeHandle(ref, function () { | ||
@@ -1338,5 +1349,3 @@ return marker; | ||
return /*#__PURE__*/React__default["default"].createElement(AdvancedMarkerContext.Provider, { | ||
value: { | ||
marker: marker | ||
} | ||
value: advancedMarkerContextValue | ||
}, contentContainer !== null && reactDom.createPortal(children, contentContainer)); | ||
@@ -1343,0 +1352,0 @@ }); |
{ | ||
"name": "@vis.gl/react-google-maps", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "React components and hooks for Google Maps.", | ||
@@ -5,0 +5,0 @@ "source": "src/index.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
452825
6167