skip to Main Content

Reactjs – rtk-query trigger on state change

I have an issue which I'm trying to solve for some time: how can I trigger this fetch: const { data: warrantyInfo } = warrantyApi.useGetWarrantyInfoQuery(materials[0].serialNumber); only when I type something on serialNumber inputs by using setTimeout(),1000? Currently is triggering on…

VIEW QUESTION

Reactjs – How to 'refresh token' using RTK Query

I have a set of API calls written with Redux Toolkit. For example: import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' import { Contacts } from '../datamodel/Contact'; import { getAccessToken } from '../util/userContextManagement'; export const contactsApi = createApi({ reducerPath: 'contactsApi', baseQuery:…

VIEW QUESTION
Back To Top
Search