You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When the viewState is stored in a Redux store, the base map from react-map-gl appears to take a little longer than when the viewState is stored in React context. In the repros below, the map deckgl base map snaps into place after the other layer when the viewState is stored in Redux.
This issue becomes more pronounced with more complex layers (I think ?). The lag becomes visible for all map movements instead of just the high-speed map movements referenced below.
Any thoughts on ways to improve performance for the Redux store method?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
When the viewState is stored in a Redux store, the base map from
react-map-gl
appears to take a little longer than when the viewState is stored in React context. In the repros below, the map deckgl base map snaps into place after the other layer when the viewState is stored in Redux.This issue becomes more pronounced with more complex layers (I think ?). The lag becomes visible for all map movements instead of just the high-speed map movements referenced below.
Any thoughts on ways to improve performance for the Redux store method?
Repro Steps
viewState stored in Redux: https://codesandbox.io/p/devbox/fast-shadow-tllmln?file=%2Fsrc%2Fworld-map%2FWorldMap.jsx%3A34%2C26&workspaceId=ws_3BmRMuKkuBSU7EsDB5tt1N
viewState stored in React Context: https://codesandbox.io/p/devbox/sleepy-diffie-4cctnz?file=%2Fsrc%2Fworld-map%2FWorldMap.jsx%3A3%2C45&workspaceId=ws_3BmRMuKkuBSU7EsDB5tt1N
Environment (please complete the following information):
Library Version: react-map-gl 7.1.0
React Version: 18.2.0
Browser Version: Chrome Version 134.0.6998.118 (Official Build) (x86_64)
OS: Mac OS 15.3.2 Sequoia
Beta Was this translation helpful? Give feedback.
All reactions