Open SchneiderOr opened 3 years ago
@bramus any news for this PR? Looks like something really useful to preserve quota when origin and destination do not change between renders. Thank you for your work.
Im working with this code on my project for few months now and it works very well, Im waiting on project maintainer to decide if he want to merge it down or not
What changed?
I've added another prop that the component can take called isMemoized, by default requests are not memoized, but if you pass either boolean or a callback function you can decide when you want to memoize the request, if you pass only true to the isMemoized, memoization will be by the callee arguments (origin, destination, region, etc)
This memoize reduce a lot of unnecessary requests and preserve quota
Also in this PR - format the files with formatter rather then keeping them in an inconsistent styling