All Questions
Tagged with react-hooks axios
931
questions
-1
votes
1
answer
40
views
Translateable React label components issue
I have created a MessageLabel component, which is used as follows:
<button><MessageLabel>signin</MessageLabel></button>
The MessageLabel component uses the placeholder label ...
0
votes
0
answers
21
views
Why my context state is not changing at the time with axios method? [duplicate]
I'm trying to update the context variable using the response of the API that axios is requesting, but it is not updating (I'm using NextJS)
I need this variable to update every time when i open the ...
0
votes
0
answers
18
views
Getting value from Props before making API call [duplicate]
Hey so I'm trying to take a user's latitude and longitude and use that data in an API call to get accurate information.
I'm running into a problem where my API call is being sent before the State that ...
1
vote
1
answer
43
views
react test with useEffect, axios and useParams
...
const MovieDetails = () => {
...
let { movieId } = useParams();
const [movie, setMovie] = useState(null);
useEffect(() => {
// axios settings
let unmounted = false;
...
1
vote
1
answer
69
views
Issue with Next.js page rendering wrong data when navigating quickly between pages
I'm encountering a peculiar issue with data rendering on a Next.js page in my application. Here's the scenario: I have a Next.js page that displays customer information based on a query parameter cid. ...
-1
votes
2
answers
32
views
React "State Hook" got automatically reassigned without using setState() method
this is my first question in this forum. I hope I can describe my problem correctly.
I have a state hook called persons:
const [persons, setPersons] = useState([])
My goal is to re-render the "...
-1
votes
2
answers
45
views
State is not updating in useEffect hook
I am fetching an API and setting response data in the products array. But, the products array state is not updating and returning an empty array.
here is my code,
const [products, setProducts] = ...
0
votes
1
answer
28
views
Trouble showing fetched data on FlatList
I am fetching data with Axios according to search term that user typed. When I console.log the response; the data looks fine. I also assign the response to a state and console.log that state ...
1
vote
1
answer
153
views
Axios interceptor that relies on context state
I have a function component that handles some of my axios interceptors. However there is a request interceptor that I cannot get working. This interceptor relies on a piece of my auth context and when ...
2
votes
1
answer
65
views
Victory Chart Not Updating After Cell Edit from AG Grid
Hello React Developers:
I'm encountering a problem where a user makes an edit to a specific cell in AG Grid. The table updates fine, and an API call (GET request from Axios) returns the correct array ...
1
vote
1
answer
38
views
Axios call is in pending state and only finishes after my component completely renders
I have a component which makes an axios call. The component is supposed to make an axios call to return data and then render that data, however, the data returns back undefined and I noticed the ...
0
votes
1
answer
53
views
Don't call to method useEffect() when I call to axios.get function
I have a view in react that it has two useEffect one to order a list, and other to get the list.
"isLoading" allows to see all list when dataTailors has values.
export const ClientMainPage =...
0
votes
1
answer
76
views
React Component Not "Reacting" to TailwindCSS Class Name
I'm currently attempting to create a simple React app that tracks and displays the (rough) position of the ISS (International Space Station) on a flat map using data retrieved from Open Notify's ISS ...
0
votes
0
answers
97
views
Network error when making a GET request in React using Axios
I'm developing a React web application and I'm trying to make a GET request to an API using Axios. However, I'm getting a network error and I can't figure out what the issue is.
import axios from '...
0
votes
0
answers
26
views
useState only works with refreshing project by CTRL+C, I refresh my project on browser but useState don't work [duplicate]
The code:
import { useState, useEffect } from "react";
import axios from "axios";
const [username, setUsername] = useState(String);
const [receiver, setReceiver] = useState(String)...