React 18 experimental use() hook
Is it possible to implement the new use() hook in queryFn? Or will it just be redundant?
Thanks!
3 Replies
harsh-harlequin•3y ago
How would you use it? As far as I know,
use() is a hook so it wouldn't work inside a regular function?equal-aquaOP•3y ago
use() is special in that it can be used inside functions, or if statements. It's pretty neat
harsh-harlequin•3y ago
Interesting. I knew it could be used conditionally but didn't know it could be used inside functions. I would think it's redundant to call it inside the query function but I could be wrong. I'd be curious to see it working.