-
-
Notifications
You must be signed in to change notification settings - Fork 6
chore: Update to support 0.19 #54
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
0.19 removes updateTTL from Query. Instead it gets passed into the view factory function. This PR supports both 0.18 and 0.19 by checking the arguments passed to the view factory function. If updateTTL is passed, it is passed to the view. If not, it is taken from the query. Once 0.18 is old enough the workaround can be removed.
There is no rush to land this. It can wait until 0.19 is released... Who knows. There might be further changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@danielroe do you want to merge and release?
@@ -47,7 +47,7 @@ export function useQuery< | |||
) | |||
|
|||
watch(ttl, (ttl) => { | |||
toValue(query).updateTTL(ttl) | |||
toValue(view)?.updateTTL(ttl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just do this:
toValue(view)?.updateTTL(ttl) | |
view.value?.updateTTL(ttl) |
I would wait until 0.19 is done. I'm thinking about his to remove more things from query |
marking as draft in the interim - ping me whenever you'd like! 🙏 |
0.19 removes updateTTL from Query. Instead it gets passed into the view factory function.
This PR supports both 0.18 and 0.19 by checking the arguments passed to the view factory function. If updateTTL is passed, it is passed to the view. If not, it is taken from the query.
Once 0.18 is old enough the workaround can be removed.