Replies: 1 comment
-
I figured I should create a slice for dealing with user auth. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, and thank you for your great work on RTKQ.
Is there something like
updateQueryData
but for creating a new cache entry?I have two endpoints: one gets JWT token and a User, and another is for getting a User when JWT already exists. I want to copy the User from the first endpoint to the second so that it doesn't run unnecessarily.
If you go to https://trip.pictures and click 'Continue with Facebook', you will see two XHR requests are made. The second one could be skipped.
Here is the full code, if you need it: https://github.com/martpet/trip-pictures-ui/blob/75b27f59af3cee0dc942ae46f24444f63574d69a/src/api/endpoints/strapiAuth.ts
Beta Was this translation helpful? Give feedback.
All reactions