This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Because the user see a few months forward, and usually interacts with future events. We load the data for all future events. | |
If the user goes backward, we refetch all the data from their current date they are viewing and into the future. | |
If they move forward from there (and back again but not futher) we don't need to load any extra data. | |
We debouce this so if a user goes back multiple months, it doesn't fetch data multiple times. | |
This is not ideal. Ideally we would have a "From" and "To" dates, we would initially load 6 month of data. | |
Then if the user goes backward, it would only get the data they are missing from the server by changing the "From" and "To" | |
dates and then merging the newely retrieved data. |
OlderNewer