Open ValeryVS opened 3 years ago
It seems, that my app rerenders App
component frequently in current build. Which triggers load function from YMaps
provider. getPromise
function works correct and maps loads only one time. But sometimes load
function fired when window.ymaps
is in incompleted state.
In that case
ymaps.ready
callback, but some components are already crushed, including Map
component from react-yandex-maps
.Also, may be I misused withYmaps
HOC.
What exactly second argument waitForApi
for? Is it possible to get unready ymaps
if waitForApi
leaved by default, which is false
?
react-yandex-maps
4.4.0I use YMaps provider in such way
with
ns: 'ymaps'
, because it's necessary for vector maps.Strangely, in lates build of my app, this line https://github.com/gribnoysup/react-yandex-maps/blob/master/src/YMaps.js#L41 sometimes fired before this line https://github.com/gribnoysup/react-yandex-maps/blob/master/src/YMaps.js#L79 but ymaps isn't ready at that point. It has only
load
,modules
,ready
,vow
and__provideBundle
. Thenymaps
object is provided byMap
component render nothing. My custom components withwithYmaps
HOC also receives uncompleted ymaps object and crush.