redux-map-gl icon indicating copy to clipboard operation
redux-map-gl copied to clipboard

Why put everything in the store?

Open daumann opened this issue 7 years ago • 1 comments

Thanks for the writeup @Willyham.

Could you explain why you decided to put everything in the store (latitude/ longitude/ zoom...). Wouldn't it be more performant to only put those attributes in the store which are used somewhere else in the application and leave the "primitives" in the state?

daumann avatar Aug 09 '17 07:08 daumann

Hey @daumann, I think that putting everything in the store is necessary. The lat/long determines the centre point for rendering. If you remove it, I think the map will rubberband all over the place. Want to give it a shot? Happy to accept changes if you find a more performant solution!

Willyham avatar Aug 09 '17 10:08 Willyham