Skip to main content

All Questions

Tagged with
0 votes
0 answers
34 views

Encounter CORS issues with CRUD features when deploy to Render & Netlify

Currently, I'm trying to achieve the following features on my personal project Feature #1: Displaying detailed information for each Pokemon on a new page Feature #2: Updating the Pokemon on that page ...
Phuc Dong's user avatar
2 votes
1 answer
201 views

Refresh the access token using redux-toolkit asyncThunks

import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; import axiosInstance from "../utils/axiosInstance"; export const logoutUser = createAsyncThunk( "users/...
Abinash 's user avatar
0 votes
0 answers
55 views

Handling State Updates for Cancelled Axios Requests with AbortController in React/Redux

I've integrated AbortController into my React application to cancel Axios requests as part of my state management with Redux. My setup includes dispatching actions to update the application state when ...
george.m's user avatar
0 votes
0 answers
40 views

axios interceptor not updating my request for accessToken [duplicate]

(This question is extremely similar, only it seems sessionStorage isnt being recognized until refresh. I am using react to send login details to my backend api and redux-persist stores my response ...
Tai Abrahams's user avatar
0 votes
1 answer
258 views

ReactJS Typescript how to trigger redux dispatch event from axios interceptor

I am newbie in ReactJS typescript, I want to call redux dispatch event whenever any api gets called (before and after), with axios interceptor. Here is my code. Codesandbax Repo App.tsx import "./...
Mrunalsinh Jadeja's user avatar
0 votes
0 answers
33 views

fetching data in redux using Axios Get

The endpoint is http://127.0.0.1:8000/api and I can see the data if I go to that endpoint in my browser. amazonslice.js import { createSlice, createAsyncThunk } from "@reduxjs/toolkit"; ...
saddysad's user avatar
0 votes
0 answers
62 views

React not sending api requests for fetching data(axios get)

ProductDetail page const ProductDetail = () => { const { id } = useParams(); const dispatch = useDispatch(); const history = useNavigate(); const productDetails = useSelector((state) => ...
nafhaf's user avatar
  • 29
-3 votes
1 answer
48 views

Delete icon does not delete the item 1st time, it takes two clicks to delete the item

The first time i click on delete, the id is undefined. But the id is available on 2nd click and it deletes the item. Feed.js: const Feed = ({ username }) => { const dispatch = useDispatch(); ...
Chirag Singh's user avatar
5 votes
4 answers
15k views

Automatically refreshing access token by AXIOS interceptor request

My React App uses Axios for API-requests. Axios adds access token into headers every API-request by request interceptor. I want check expiry date before current request will be sent. If access token ...
Eujenio Gonzalez's user avatar
0 votes
0 answers
109 views

How can I handle Axios erros with RTK?

I have service which send request to server by axios. async login(query: LoginQuery) { return await axios .get<UserModel>(`${this._apiPath}${API_PATH.AUTH}${AUTH_API.LOGIN}`, { ...
Stan Wolf's user avatar
0 votes
0 answers
86 views

cannot get token after refresh page (F5) redux-toolkit

i have token that send to global variable using redux const initialState = { user: null, isError: false, isSuccess: false, isLoading: false, message: "" } export const ...
si bungsu's user avatar
0 votes
0 answers
62 views

My Redux persisted store is not persisting the state properly

I am creating a web app using Django as backend and React on frontend. Am pretty far ahead and almost ready to deploy on my staging server, currently just clearing some issues before I do that and I ...
beni14's user avatar
  • 49
-1 votes
1 answer
534 views

How i can fix error Cannot read properties of undefined (reading 'orderItems')?

i'm starting developing one webshop and i got this error. This is my code: import React, { useEffect } from "react"; import { Link } from "react-router-dom"; import Header from &...
Sanchosmore's user avatar
0 votes
1 answer
177 views

Axios post file and json in the same request

I am trying to post 3 files and json to an API, I am just a bit confused on how to do it export const postfunc = createAsyncThunk( "dashbaord/postfunc ", async (filesSelected, ThunkAPI) =...
Fares Saleh's user avatar
0 votes
1 answer
512 views

Cancelling all request initiated from Axios instance

We are following the repository pattern in our project where we have a dataLayer file that takes care of instantiating Axios and setting up the baseURL. Like so: const LcAPI = axios.create(); We also ...
Md. Arshad Khan's user avatar

15 30 50 per page
1
2 3 4 5
53