Is this style correct?
Hello 👋
I use this style to "group" and organize my queries:
I'd like to have confirmation that I'm not making a serious mistake by using this kind of style. Does that seem correct to you? (There is no Suspense because router ensure query data before the page load)
4 Replies
fascinating-indigo•2y ago
It is okay, but your queryKeys are not hierarchical which might bite you in the long run
dependent-tanOP•2y ago
I should find a better way to manage the keys thank you! 😄
I wonder if something like this would do the trick?
fascinating-indigo•2y ago
Look into tkdodo.eu‘s blog or lukesmith query key factory
dependent-tanOP•2y ago
Nice, I'll have a look, thanks a lot!