-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent map re-rendering on update with Redux subscription #445
Comments
It is true that Redux does use Reference: |
Please refer to Getting Help section in the README (or #469). |
I've searched stackoverflow, but couldn't find an answer. Care to elaborate on a solution @aaronofleonard ? |
The answer is just use |
@aaronofleonard , This does not resolve the issue. What if I have list of Map Markers that are dependent on the global state/redux ? I want to update my Map but re-rendering the Map has this 'flicker' side-effect. How to solve this issue ? |
I saved location data in the local State. In my case, this problem was solved. |
@yuracherkasov , i'm aware of that but my situation is different, i must listen to socket for changes in the list of markers. |
@jojo-tutor I am facing the same issue, anybody found solution for above. I have a websocket connection from where i am continuously getting lat lng, I am not even updating the center but it is updating the center as soon as any event is received and causing flickering issues |
Hi there,
I imagine there is a way of doing this that is easy and obvious that I have not seen. I would like to use this package in a redux app I am building but I am having trouble with the map re-rendering any time I update my store (which, being a redux app, is basically any time anything changes). There was a suggestion in another issue to use componentShouldUpdate(...){ return false } but this appears not to be of use here as redux's subscribe uses forceUpdate() which specifically circumvents componentShouldUpdate.
Any thoughts would be appreciated!
The text was updated successfully, but these errors were encountered: