-
Notifications
You must be signed in to change notification settings - Fork 34
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
Allow loadLayerData to intelligently handle multiple requests for the same resource as efficiently as possible #84
Comments
I like the merged "belt & suspenders" solution of having a (essentially no-op) loader in As far as handling Unfortunately, there's one other complication: in the truly general case, I don't think |
Yes that would work great here! I'm not sure if you recall, but this addition was never merged because of the fear that if
That's very true. We can look into storing pending promises within the map state slice to check from whenever a new dispatch comes in.
This could probably be coded directly into the code for
I'll make sure to check these too. I'll try give this a go after the UI issues we are currently working on are complete. |
@ericboucher - I have no idea if this issue is still something that needs to be addressed. Assigning to you, but please close it if this isn't relevant anymore |
This is a continuation of the concerns raised by @bencpeters at the following PR disscussion.
In summary, the way
BoundaryLayers
will load after #81 merges is less than ideal since it is done inMapView
. We ideally want a way to load it inBoundaryLayer
. If you have a solution, let us know!Also, after exploring issue #27, I noticed
loadLayerData
does not have any way to prevent loading things twice or loading while the promise ispending
. The current measurements that ensure this doesn't happen are located within the dispatch itself (example).There is an article on Redux Docs on how to achieve this.
I've already attempted to solve this here, but the implementation isn't done too well - we mutate an object that just lives alongside the thunk. If we can agree this is a worthwhile issue, I can continue on this branch and make a solution that instead works around redux states.
The text was updated successfully, but these errors were encountered: