Replies: 1 comment 3 replies
-
This seems technically valid, yeah. The only comment i'd have is that you'd have to be careful when using it for queries - since endpoints are cached by serializing the args provided to the query, you'd probably want to provide a custom serializeQueryArgs that excludes any non-relevant arguments. Otherwise, you may end up fetching things more often than you'd like. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I posted an idea here which sort of relates to this.
In our app, we have a couple of places where we piggyback on the query args to configure things on the client, for example:
Just curious as to whether it's appropriate to use query arguments for this type of extra information which is only consumed on client.
My understanding is that it will be used as part of the key formed for the cache? Could there be a preferred way to add extra info to rtk-query actions in the component?
Beta Was this translation helpful? Give feedback.
All reactions