Skip to main content

All Questions

Tagged with
2 votes
1 answer
312 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
63 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
  • 59
0 votes
1 answer
565 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
0 votes
1 answer
96 views

how to upload data to axios.post in react redux

There was a problem when transferring data to the redux toolkit for axios.post an error occurs Expected arguments: 0, received: 1. Here is the redux code with the queries: export const favoriteFetch ...
Gumblll's user avatar
  • 33
0 votes
1 answer
215 views

Failing to fetch data from Axios using Redux

im trying to make a axios request to my eccomerce api using axios, but its returning empty, i tried many things but its not working, these are my files: Store.js(i tried to use configureStore but it ...
user avatar
0 votes
2 answers
904 views

Use axios and axios-mock-adapter for onSubmit event

I'm trying to use axios and axios-mock-adapter in one place to aggregate more mocks and then export the axios instance to use it wherever I want: axios.js import axios from 'axios'; let api = axios....
Payam's user avatar
  • 1
1 vote
0 answers
125 views

Uncaught ReferenceError: Cannot access '__WEBPACK_DEFAULT_EXPORT__' before initialization when importing redux store

I cannot import redux store from store.js to customAxios.js file. I need to send token to backend which resides in redux store. So I need to extract that token, then add into axios Header. Steps I ...
Abdus Samad 03's user avatar
3 votes
1 answer
304 views

REACT - REDUX how to update the global state of a redux app in child component that fetched data in parent when app is mounted

I have a react application that fetch data with redux thunk and set it as global state from a main component when the app is mounted then I have a child component where a form is filled and then I ...
TTT2's user avatar
  • 581
1 vote
2 answers
422 views

React - Axios to get props return always promise

I have a react application that renders from a main component, when this component is mounted I fetch some data using redux thunk and pass the response as a global state, in this main component there ...
TTT2's user avatar
  • 581
0 votes
0 answers
97 views

How to make react component call an axios HTTP request

I am trying to make a section for my website with a news bar that contains snippets of update posts for my site. To do so, I have successfully created the data schema, routing on my backend for post ...
Zachery Uporsky's user avatar
2 votes
1 answer
622 views

How to map array inside of Object in Redux React?

I'm using React and redux-toolkit for front-end development. When I try to map() the array inside of the object whole screen goes blank. This is the data structure that I'm getting from the redux ...
Prakash Sharma's user avatar
0 votes
0 answers
346 views

Remove the abort controller after cancelling call

I have managed to cancel my http request via axios and redux. This is what I have so far. I have a modal, this modal is saving data to a database, once I click on the abort, i cancel the dispatch ...
seyan's user avatar
  • 21
0 votes
0 answers
68 views

Working on login/register features, userInfor shows undefined

I don't know why it shows "{ userInfo: undefined }", testing with postman making a post request was successful and I can get users info including the token but nothing shows on the redux ...
Khaled 's user avatar
-1 votes
1 answer
120 views

Error in Cart Page while updating product quantity

Please help me with my REACT problem. On the cart page, while I try to increase the quantity or decrease the number of quantity products, I get this type of error. I have attached the error in the ...
Sayedul Karim's user avatar
0 votes
0 answers
114 views

I'm trying to make a post request with headers but when I send request then return a bad request error

I'm trying to make a post request with headers but when I send request then return a bad request error. const header = { headers: { 'Content-Type': 'application/json', '...
Mücahit's user avatar

15 30 50 per page
1
2 3 4 5
19