Does React.cache work with sequential data fetching?
Unanswered
Maremmano-Abruzzese Sheepdog posted this in #help-forum
Maremmano-Abruzzese SheepdogOP
Hi, I have a data fetching function that I wrapped with
E.g. I am fetching data A, after which I use data A to make a new API call for different data B. This entire function is wrapped by
I'm having some small bugs, so I was wondering if the way I have set it up works? Does
React.cache() , but I don't 100% understand if it needs to wrap a single data fetching call, or if it can work with more complex logic. E.g. I am fetching data A, after which I use data A to make a new API call for different data B. This entire function is wrapped by
React.cache(). I'm having some small bugs, so I was wondering if the way I have set it up works? Does
React.cache just work with any async function, and does it just cache it unless it receives a different argument, regardless of what happens inside the function itself?