add `startAfter` usage example
- Dominant language
- TypeScript
- Stars
- 46
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
required setup:
```js
const profileCollection = magnetar.collection('profiles').where('show', '==', true).where('archived', '==', false)
const query = profileCollection
.orderBy('lastActiveOrSomething')
.limit(50)
const lastProfile = computed(() => {
return [...profileCollection.orderBy('lastActiveOrSomething').data.values()].pop()
})
```
then either:
```js
const profiles = ref([])
const fetchMore = async () => {
const newProfiles = await query.startAfter(lastProfile.value).fetch()
// push to profiles
profiles.value.push(...newProfiles)
}
```
or
```js
const fetchMore = async () => {
await query.startAfter(lastProfile.value).fetch()
}
```
and
```html
{{ [...profiles.data.values()] }}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.