-
Notifications
You must be signed in to change notification settings - Fork 49
feat(react): add useQuery and useStatus hooks #142
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
Conversation
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.
It would be nice to see other react hook results like isLoading
or hasSynced
being used in the demos and mentioned in the readme.
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 from my side
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.
There are some issues when the query (or parameters) change:
- The query is not refreshed until another change notification is triggered.
- The watched table list is never not updated.
This is specifically noticeable on the "SQL Console" page of the react-supabase-todolist demo
Description
Implement new hooks
Work Done
useQuery
hookuseStatus
hookusePowersyncWatchedQuery
,usePowerSyncQuery
andusePowerSyncStatus
hooksHow to test
Note: The suspense and kysely hook changes will follow after this, and I will make a separate change for the Vue hooks so that they conform to this new change