React Hooks #726
Unanswered
cdedreuille
asked this question in
Feature Requests
React Hooks
#726
Replies: 1 comment 1 reply
-
I created a React hook like this to test it out. Not sure if this is the best optimisation, but it should make queries easier:
I use it like this:
I'm actually creating a client both on the hook and on my component. Not sure if that's a problem. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From the Slack clone example, I can see that in order to get realtime data from Supabase, you are creating a listener and then if there's a new row added you're concatenating the new row with the existing one. While this is pretty simple to understand, I wonder if there is a simpler way to do this?
Firebase has the
.onSnapshot()
method with the listener built-in.Is this something you are planning to do? Or is there a Reac Hook that simplifies Supabase queries out there?
I'm mostly using
react-firebase-hooks
right now to query Firebase on my Nextjs app.Beta Was this translation helpful? Give feedback.
All reactions