Map first render #603
Unanswered
VolteCoOfficial
asked this question in
Q&A
Replies: 1 comment 4 replies
-
When I create the map like this: <APIProvider apiKey={API_KEY}>
<Map
colorScheme={'DARK'}
{/* ...other props... */}
/>
</APIProvider> I don't see any flash in the wrong map-style, so I suspect that in your case the state-variable or prop controlling the color-scheme changes, and the Map component renders twice. This is really important to avoid, since that might actually double your cost. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
If my app is in dark mode and I set the style on the map to be DARK, the first render of the map is still light and it causes a flicker in my app on load.
How to avoid that?
How to set the map first picture?
I already have an onAPILoad hook but that did not help since the map initial frame is coming after load. Will come back with some code later.
Beta Was this translation helpful? Give feedback.
All reactions