Replies: 1 comment 3 replies
-
Yeah, currently unfortunately #3709 would change that. Meanwhile your current approach is perfectly fine. |
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
-
Wasn't able to find any docs on how this is supposed to work.
I often end up looking up data on the fly, usually in code that hasn't been completely migrated to RTK and RTKQ yet.
It results in code like this:
I'm under the impression that its a good idea to unsubscribe here to make sure I don't re-run this when its not needed. This is only mean to be on the fly.
I discovered the "subscribe" option that we can pass to .initiate(), in the second argument, to make it look like this:
However, that doesn't work the way I expected it to, as it never gets the data from the query if it isn't already loaded.
Beta Was this translation helpful? Give feedback.
All reactions