How can I use React Query within a react-router loader without encountering useContext errors and while having access to isLoading and isError states?
I’m working on a React application where I use react-router for routing and react-query for data management. My goal is to fetch data within the react-router loader function, but I’m encountering issues with accessing isLoading and isError states from react-query.