nd-json and react-query #4082
Replies: 2 comments 4 replies
-
At the moment, not natively, no. Your queryFn needs to return a promise. You can create a promise that sets up a subscription via |
Beta Was this translation helpful? Give feedback.
-
Hi, The code is in the repo here: These are the main components as they look atm:
Using the query is done as:
Hope this is useful to someone. @TkDodo Any thoughts about this approach? Thanks, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have discovered nd-json, which basically streams json objects in a reactive fashion.
Each sent element is valid json, but collectively it is not. A toy example:
Is it possible to process each of these objects as they arrive using react-query?
Thanks,
Jesper
Beta Was this translation helpful? Give feedback.
All reactions