Skip to content

Commit ea6d06c

Browse files
committed
Document first-load tracking in the find mixin
The `have<Resources>BeenRequestedOnce` and `have<ResourcesLoadedOnce` allow tracking if the first query has completed or not. This allows you to set a watcher on either and perform some logic when it toggles to `true`.
1 parent 4f9aaa2 commit ea6d06c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/mixins.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ Based on what options you provide to each mixin, some dynamically-generated prop
9999
makeFindMixin({ service: 'videos' }) = {
100100
data: () => ({
101101
isFindVideosPending: false,
102+
haveVideosBeenRequestedOnce: false,
103+
haveVideosLoadedOnce: false,
102104
videosLocal: false,
103105
videosQid: 'default',
104106
videosQueryWhen: true,
@@ -131,6 +133,8 @@ If you were to handle two queries from the same service, you would use the `name
131133
makeFindMixin({ service: 'videos', name: 'myVideos' }) = {
132134
data: () => ({
133135
isFindMyVideosPending: false,
136+
haveMyVideosBeenRequestedOnce: false,
137+
haveMyVideosLoadedOnce: false,
134138
myVideosLocal: false,
135139
myVideosQid: 'default',
136140
myVideosQueryWhen: true,

0 commit comments

Comments
 (0)