1,064 questions
-1
votes
1
answer
53
views
+100
The API does not work after clearing the cache on Andriod [closed]
I am developing an application in React Native v.0.78.0 using RTK query for back queries. Previously, everything worked fine, but not so long ago I discovered that after clearing the application cache ...
1
vote
1
answer
23
views
rtk query and store management
I understand that RTK Query signifies a shift in thinking from Redux store / state management, and the general paradigm is that you use the RTK Query endpoint anytime you need data, and rely on it to ...
1
vote
1
answer
32
views
RTK Query Mutation with selector
I've used redux toolkit for a few years and I'm pretty familiar with it. I'm going through and attempting to update old code using the newer RTK Query strategy to replace some of my old slices and ...
0
votes
1
answer
65
views
RTKQuery with SignalR Websocket
I'm attempting to use RTK Query with a signalR websocket service to keep my react app up to date with server data.
My RTK API looks like this:
export const hubConnection = new signalR....
0
votes
0
answers
60
views
NextJS 15 - SSR fetching with RTK query & Redux
I'm having a little problem on my SSR calls for RTK query, they provide hooks to use but in the case of server side rendering, how do I fetch data via RTK query?
I could not find a solution for it and ...
1
vote
1
answer
79
views
How to get cached data in RTK-Query using useLazyQuery?
I am having issues understanding how to get useLazyQuery to get the cached data on a second time the component is mounted.
Imagine the following:
...
const [trigger, { data }] = api.useLazyQuery(); /...
0
votes
0
answers
55
views
How to Maintain Dynamic RTK Query Tag Validation and Invalidation for Multiple API Slices in Redux Toolkit?
I'm working on a project using Redux Toolkit (RTK) Query to manage multiple API endpoints, where each API slice is constructed dynamically through a function. My goal is to maintain a dynamic approach ...
1
vote
1
answer
70
views
RTK Query. How to handle path variable in baseUrl?
I need to make a request to a URL like this /common/path/:userId/specific/path/endpoints. /common/path is shared across many endpoints, and I don't want to put all of those queries in the same file. ...
1
vote
1
answer
84
views
Redux-Toolkit (RTK) Query get mutation endpoint loading state
I have a component (like a dialog box) that provides the Submit button. This dialog component then renders a form component.
Form component includes all the fields and also RTK Query to send the ...
-1
votes
1
answer
92
views
Why am I getting 'X is not a function or its return value is not iterable' in JavaScript?
I am trying to iterate over the result of calling function X, but I get the error: 'X is not a function or its return value is not iterable.
I am using RTK Query. I am fetching data using post call on ...
1
vote
1
answer
59
views
Managing redux toolkit query loading state with polling
I have a REST API endpoint and a react app that uses redux toolkit (RTK). The UI displays a loading state when fetching the endpoint and refetches the endpoint every 15 seconds to poll for new data. ...
1
vote
2
answers
65
views
How to Refetch Data from One Microservice After a Mutation in Another Using RTK Query?
I’m working with microservices in a React app using Redux Toolkit (RTK) Query. I have two separate APIs:
Service A: For posting data (postData).
Service B: For fetching data (getData).
After ...
0
votes
0
answers
78
views
Cant read Action Payload returned from a RTK Query Fetch using Middleware
Im trying to read a payload from an action that is dispatched with RTKQuery, it is from an async thunk internally that RTK uses. I want to make it global handling using a middleware.
export const ...
1
vote
1
answer
146
views
Which is in Redux Toolkit the type of a `builder.mutation` return value?
I've setup my Redux-Toolkit in my Nextjs application.
I've a mutation, setup like this:
postCar: builder.mutation<Car, CarEndpointPostParams>({
query: ({ body = {} }) => ({
url: "/...
1
vote
1
answer
187
views
Can you use RTK Query queryFn with transformResponse and createEntityAdapter?
I'm pretty new to using adapters and RTK Query, and also not too advanced with TS, so sorry if the answer seems obvious! Everything is working fine when using queryFn with firebase and using the ...