can i export data isLoading error from reactQuery?
Please i need some help here. 🙏
I fetched
data[]
from an API
using reactQuery
but the problem I'm facing here is that i need to export all the properties decontructed from reactQuery
such as the data[]
, isLoading
, error
so that i can be able to use it in another component, is this possible?
I name the file userData.tsx
5 Replies
You can use prop or redux Rtk to send data.
either set it up through context OR put it into the common ancestor and pass it through as props
Take a look at this article: https://tkdodo.eu/blog/react-query-as-a-state-manager
React Query as a State Manager
Everything you need to know to make React Query your single source of truth state manager for your async state
Ok
Let me take a look at the article