Skip to main content
Advice
0 votes
4 replies
80 views

I am trying to move to RTK Query, but am struggling with one thing - how to access React Context. I currently am using custom hooks to query a back end. Depending on the environment (dev, uat, prod), ...
vegemite4me's user avatar
  • 6,956
0 votes
2 answers
129 views

I have a REST API that I want to call from multiple React projects, and I was thinking to make a library that exposes the REST API calls, using the Redux Toolkit Query code generation. I would like to ...
Paolo Tedesco's user avatar
0 votes
1 answer
145 views

I’m using RTK Query in a React component to fetch users: function MyComponent() { const { data, isLoading, isError, isSuccess, } = useGetUsersQuery(); if (isLoading) { return <div&...
lucataglia's user avatar
0 votes
2 answers
52 views

Setting state value from RTK Query Suppose you fetch some data with a RTK Query endpoint like in the website's example: export function Posts() { const { data : post, isFetching, isLoading } = ...
Bernardo Borges's user avatar
0 votes
0 answers
104 views

The request is frozen on the pending status, the loading status does not change in the component {status: “pending”, isLoading: true, data: undefined}, I see the response in devTools and in my API, ...
Mykola Kosobutskyi's user avatar
1 vote
1 answer
70 views

I have problems with understanding how to properly handle a case. Let's say we have a simplified component: const XComponent = ({ aCallback }) => { const [mutation] = useRtkQueryMutationHook() ...
freafrea's user avatar
  • 159
-1 votes
1 answer
85 views

I currently want to add meta data to the RKT Query request header and it's a variable. I want to pass it from the API request. export const api = createApi({ reducerPath: 'api', baseQuery: ...
Moon's user avatar
  • 157
2 votes
1 answer
98 views

I'm working on a React app with Redux-Toolkit (RTK) Query. I need to fetch accounts from the server and then render them as well derive some data from them through a chain of selectors. If I fetch ...
user3272018's user avatar
  • 2,471
1 vote
1 answer
85 views

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 ...
user101289's user avatar
  • 10.6k
1 vote
1 answer
113 views

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 ...
user101289's user avatar
  • 10.6k
0 votes
1 answer
213 views

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....
user101289's user avatar
  • 10.6k
0 votes
0 answers
96 views

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 ...
Amir Abaris's user avatar
1 vote
1 answer
295 views

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(); /...
renatodamas's user avatar
  • 20.1k
0 votes
0 answers
113 views

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 ...
Andishe Abbasian's user avatar
1 vote
1 answer
220 views

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. ...
Lucy Johnston's user avatar

15 30 50 per page
1
2 3 4 5
71