mapRef not being updated on load #2438
Unanswered
nareshbhatia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello react-map-gl community,
I am trying to use a
mapRef
as a dependency in myuseEffect
to install geocoders. My code follows this example in the docs. Unfortunately, themapRef
is not being updated even after the map is loaded and hence theuseEffect
is not triggered. Here's the console output (note that there is nomapRef
change after the map is loaded):What am I missing? My code is shown below (the full repository is here):
Package versions:
Beta Was this translation helpful? Give feedback.
All reactions