Add example for UI-only infinite pagination to our examples folder, that doesn't keep an array of variables, and instead renders pages dynamically and recursively, which is often preferable, and also restores all pages on initial mount against the cache.
While this is a simple pattern, it's often overlooked and not considered. Worst of all, because we had no example of this, it was hard to communicate this as a real example to handling infinite pagination via:
added state
added effects
Graphcache
Which is all not preferable to this new example, unless a flat list of items is needed (in such a case, Graphcache's pagination helpers are still preferred)
Add example for UI-only infinite pagination to our examples folder, that doesn't keep an array of variables, and instead renders pages dynamically and recursively, which is often preferable, and also restores all pages on initial mount against the cache.
While this is a simple pattern, it's often overlooked and not considered. Worst of all, because we had no example of this, it was hard to communicate this as a real example to handling infinite pagination via:
Which is all not preferable to this new example, unless a flat list of items is needed (in such a case, Graphcache's pagination helpers are still preferred)