redux-toolkit
redux-toolkit copied to clipboard
The official, opinionated, batteries-included toolset for efficient Redux development
See #1939. I'll update tests later.
I feel that the documentation needs to cover the following scenario. I have an array of objects that I need to send to the API. The API only allows mutating...
### Description Current implementation of [listernerApi.fork](https://redux-toolkit.js.org/api/createListenerMiddleware#child-tasks) has an **implicit** contract: ``` 1. The output forked task is scheduled **synchronously** in a microtask. 2. The output forked task will **always** run...
Currently, the return type of `transformResponse` on `enhanceEndpoints` has to match the original return type from `createApi`. This diminishes the value and ability of `enhanceEndpoints`: Often, it is preferred to...
I'm using the Typescript RTK Query code gen plugin to generate some api hooks. Example: ```ts const injectedRtkApi = api.injectEndpoints({ overrideExisting: true, endpoints: (build) => ({ Notification: build.query({ query: (variables)...
Steps to reproduce: 1) declare an API with a `baseUrl` 2) add an endpoint that should query root `baseUrl` with params 3) call the endpoint Expected url: `/api/foo?bar=baz` Actual url:...
Would the project team be interested in adding first class offline support to the roadmap? Given that RTK is making api integration really simple, could there be room for some...
``` const someSlice = createSlice({ /* ... */ extraReducers: builder => { builder.addMatcher( isFulfilled(...someAsyncThunkArray), // ``` >export declare function isFulfilled(...asyncThunks: >AsyncThunks): (action: any) => action is FulfilledActionFromAsyncThunk; >``` I tried...
Is there any way to provide placeholder data when executing a query? For example if I have the following: ```javascript const { data } = useMyCoolQuery(); ``` I'd like `data`...
I'm currently writing tests in jest and testing-library, while using msw to mock my results as well as errors. On a browser, it catches errors fine, and returns the results...