redux-toolkit
redux-toolkit copied to clipboard
The official, opinionated, batteries-included toolset for efficient Redux development
This PR aims to fix #3314. This is currently a draft as I have yet to fully update all TypeScript types and add tests. I'm creating this to get any...
## Background I'd like to determine `baseUrl` when make the actual api call. > `baseUrl` is just for example, in some cases, you may want to make the final decision...
As the guide mentions, I went first to StackOverflow so for Context and Code go to: https://stackoverflow.com/questions/78329782/onquerystarted-rtk-query-triggers-twice Well basically as the title mentions. I'm trying to do an optimistic update...
First of all, I understand that it's probably not right place to ask. Anyway, I hope you could help me. I have a `createAsyncThunk` with a `rejectWithValue` that I want...
### Issue I just tried to convert an openapi schema to RTK query, and stumbled upon the following error: ``` Error: path parameter id does not seem to be defined?...
I'm working on writing a little API for communicating with my authentication server. For logging in and out, it is necessary to perform a redirect. Does RTK Query currently support...
Hey! `useQuery` hook accepts `refetchOnMountOrArgChange` option. I find it very helpful when I need to refetch the data from the API after some time passed. I'd like to achieve exact...
I just ran into this problem and found [this](https://github.com/reduxjs/redux-toolkit/issues/1376#issuecomment-1361617034) comment saying it's expected behavior, but I'm making this issue with a clearer example for further discussion because this seems like...
## Context I used the `filterEndpoint` in the configuration for `[rtk-query-codegen-openapi](https://github.com/reduxjs/redux-toolkit/tree/master/packages/rtk-query-codegen-openapi)` like this: ``` filterEndpoints: [/^clientapps/], ``` ## Problem **Expected behavior:** The endpoints are filtered by their path according to...
Need an example of how to test code like this. ## Thunk Action  ## Test file  ## An error I caught `sessionApi.endpoints.login.initiate` it's a second call where an...