Live data
Hi guys, I am using an index table - I have a button on it that enqueues an action that runs in the background.
Is there a clean way that I can update the table once the background action has finished running?
7 Replies
If you are using an
AutoTable
you could use the prop live
Link here to the AutoTable
docs for more: https://docs.gadget.dev/reference/react/auto#autotable-Unfortunately its not auto table, I have a lot of actions around the table so I could not use it
On your useFindMany there's also the
live: true
property. Have you looked at that? It makes the hook use a websocket connection to the databaseah ok, I will try it now because I am using remix loaders
will see if adding live property works
To make it live you'll need to use the hook (as far as I'm aware)
So the data fetch won't be able to live in the loader
ahh ok, that makes sense thanks
I might just not use loaders then
and use the hook instead
I think that in a lot of cases loaders make sense but not in this particular case