using tanstack/reat-query or providing an alternative to use it #65
Replies: 3 comments 5 replies
-
Soon I will make the compiler customizable so you can create your own magical const { requestContext } = usePageContext();
const fetched = useYourFavoriteDataFetchingHook(async () => {
const result = await runServerSideQuery(requestContext, () => {
// Do some server-side work here
// ...
});
// Do something with the result here
// ...
return result; // or whatever
});
BTW there's a bug in the react-query demo, I'll fix it soon. |
Beta Was this translation helpful? Give feedback.
-
meanwhile can i try to make the devtools work with rakkasjs (if possible) ? |
Beta Was this translation helpful? Give feedback.
-
I'm still undecided about whether to abandon Rakkas's own But it would be an argument in favor of keeping it if react-query dev tools worked with it. I'd probably extract into its own package actually. |
Beta Was this translation helpful? Give feedback.
-
I checked out your example of using react query but that couldn't be used with useSSQ or useSSM ( correct me if I'm wrong ). Why I like react query is it does have all or atleast necessary tools like devtools and cache persister.
Alternatively an option for cache persister can be provided while devtool could be ported i guess. I saw the code and i think it won't be much difficult to port
Beta Was this translation helpful? Give feedback.
All reactions