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
stormy-gold•2y ago
It is okay, but your queryKeys are not hierarchical which might bite you in the long run
rare-sapphireOP•2y ago
I should find a better way to manage the keys thank you! 😄
I wonder if something like this would do the trick?
stormy-gold•2y ago
Look into tkdodo.eu‘s blog or lukesmith query key factory
rare-sapphireOP•2y ago
Nice, I'll have a look, thanks a lot!