How can use apollo-client in new react-router loader pattern?

New react-router announced new feature that called action and loader, but they are pure function so i can’t use hooks (ex) uesQuery). I can send client i to singleton object but i’m not sure that is good approach. Give me some ideas!

Hi @loki4reddit :wave: welcome to the community forum! Have you seen this post yet?

There are some sample code snippets in there that might be of use :eyes:

Thanks for your help :slight_smile: , but this question is written after i already saw that example. I’m in curious about use hook inside of loader. But hook only support use in component. I’m wondering in this situation what kind of alternative exist thanks!