Skip to content

v3.5.0

Latest
Compare
Choose a tag to compare
@logaretm logaretm released this 18 May 20:14
· 1 commit to main since this release

πŸ†• New Features

Added on demand subscription model (e5c9e85)

You can now manually subscribe and unsubscribe from a subscription using the subscribe and unsubscribe functions, and coupled with subscribeOnMount set to false you can now initiate the subscription only when needed rather than juggle paused and skip to achieve this.

const { subscribe, unsubscribe } = useSubscription({
   // ....
  subscribeOnMount: false
});

if (something) {
  subscribe();
}

Accept several options as RefOrGetter (5c9a789)

In multiple areas we were still accepting a Ref or a plain value, like with queries, contexts, etc...

Now you can pass getters as well, this makes villus utilize the MaybeGetterOrRef type from vue package and gives you more flexibility as you won't need to wrap those options with computed anymore.

πŸ› Bug Fixes

  • fix(types): subscription forwarded should receive a string always #210 (8b02c12)
  • fix: watch the query if it is a getter in useQuery and useSubscription (b81eec6)