Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content
Stack Overflow
  1. About
  2. For Teams
Loading…
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives
1,062 questions
Filter by
Sorted by
Tagged with
0votes
0answers
44views

Redux-Toolkit query mutation optimistic update but tag to update has expired from the Redux cache

I'm using RTK Query in a React + Redux app.When I delete an item using a mutation, I use optimistic updates (in onQueryStarted) to update the /list data without refetching.However, if my /list tags (...
0votes
2answers
88views

Using RTK Query to create a library for calls to my API

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 ...
0votes
1answer
108views

How to handle API error with a manual retry button without triggering infinite refetches?

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

How to set state value live from react RTK Query?

Setting state value from RTK QuerySuppose 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
0votes
0answers
93views

The request is frozen on the, {status: “pending”, isLoading: true, data: undefined}

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, ...
1vote
1answer
65views

Handling stale callbacks in unwrap of mutations

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() ...
-1votes
2answers
78views

How can Redux-Toolkit Query send a variable to request headers?

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
  • 147
2votes
1answer
87views

How to use parametrized queries in selectors?

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 ...
1vote
1answer
62views

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 ...
1vote
1answer
94views

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 ...
0votes
1answer
154views

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....
0votes
0answers
88views

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 ...
1vote
1answer
228views

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

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 ...
1vote
1answer
196views

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

153050per page
1
2345
71

Hot Network Questions

more hot questions
Newest rtk-query questions feed

[8]ページ先頭

©2009-2025 Movatter.jp