Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow providing a function string | LiveQuery<T> with useLiveQuery #503

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SandroMaglione
Copy link
Contributor

As discussed inside Discord, this PR adds a new accepted signature to useLiveQuery as follows:

export function useLiveQuery<T = { [key: string]: unknown }>(
  liveQueryPromise: () => Promise<string | LiveQuery<T>>,
): LiveQueryResults<T> | undefined

This allows to provide a function returning a query string or a generic LiveQuery to useLiveQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant