All Questions
15 questions
0
votes
1
answer
2k
views
TypeError: axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(...).than is not a function
I start recently ReactJS. However I'm not very familiar with ReactJS specially with axios.
In this project I'm getting the data from the API. but it will trigger the given below error.
"TypeError:...
0
votes
3
answers
843
views
React JS useEffect hook send infinite no of request if i add an dependency
i have made an API in Django for fetching the TODO list tasks in my React JS Application but when i use allTasks of useState in dependency array of useEffect Hook then it starts sending endless get ...
4
votes
1
answer
2k
views
how to pass react hook objects to axios interceptor from index.js in react
I want to use axios request and response interceptor to show/hide loader before and after each request. For this I using redux to maintain loader state, But I can not use useDispatch and useHistory ...
1
vote
5
answers
1k
views
React fetch data before render class component
I have tried every option i can find myself but i am not understanding what am i doing wrong.
My axios get data update but when i use conditions it always render the first state data. this is my code.
...
0
votes
1
answer
35
views
My props value for 'streams' is always undefined
I'm finding that no matter that I do, my value for this.props.streams is always undefined. I have confirmed that the backend API is returning values when queried. Example output:
{
"...
1
vote
2
answers
2k
views
React proxy, the server responded with a status of 404 (Not Found)
By default I am running at localhost: 3000.
I want to send a request to localhost: 8072 with the proxy setting.
I've done proxy settings and I'm getting an error.
In addition terminal shows an erorr
...
0
votes
1
answer
206
views
Redux and React: Unhandled Rejection (TypeError): Cannot read property 'push' of undefined
In the Redux action file code, I am trying to implement history.push('/userfeed') when user has successfully logged in. However, I keep getting the following error: Unhandled Rejection (TypeError): ...
0
votes
1
answer
1k
views
Add dynamic data in XML body for AXIOS Post
I need to post a request using AXIOS. The request body is in XML format. I am able to POST a request using static data in XML body using AXIOS but wanted to pass the value dynamically.
Can you please ...
0
votes
1
answer
813
views
If backendserver is down then How to handle in Reactjs with Axios
Current I am using Axios to fetch data from backend , if the backend is down then how to handle it.
Right now if the user directly access somepage in the APP without login, it will show him the page ...
1
vote
3
answers
3k
views
React axios.get not working it's says failed to compile
I am new in React . I am trying to get my api data with axios . But getting error . My code are :
import React from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import ...
1
vote
1
answer
38
views
I made a voteapp with react.js, used styled-components but in index.html rendering all
An error occurred while designing with scheduled-components The error is caused by overlapping components. I set up the url using route. The first component that comes out is the app component, but ...
-1
votes
1
answer
507
views
prop returns Null when component renders
I am trying to add some functionality that enables or disables a button depending on whether the user has at least one "credit". I want to use the logical && to determine whether to enabled or ...
5
votes
3
answers
34k
views
"Uncaught TypeError: Cannot read property 'type' of undefined" and unclear what it is related to
I originally thought this was an issue with react-redux, axios, lodash, and/or react-dropzone; however, files are uploading fine, but this error still triggers. (Even though it is says "failed" in ...
1
vote
1
answer
2k
views
Redux loses state when navigating to another page using react-router 'history.push'
(as you can see my reputation is not very high :) and I understand that if you don't like my question it is going to be my last one, therefore I am going to write it as good as I can :)
The problem I ...
0
votes
2
answers
2k
views
how to call ajax in react using `redux-thunk`?
I am trying call ajax in react using redux-thunk and axios .I want to get data from json file
simple way (on button click call like this)
axios.get('data.json').then((data)=>{
console....