python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
React custom hook returning array and utilize the same in App component
I have my App component defined as below;
function App() {
const [state1, setState1] = useState({});
const [state2, setState2] = useState({});
const [isApiCallDone, setIsApiCallDone] = use...
copenndthagen
Votes: 0
Answers: 2
Why does my component rerender at onChange and not onClick?
Im trying to figure out why does my component re-render only when I am typing on my textfield (Im guessing it changes because of the onChange part? ) where it does not re-render after I made the API c...
SushiRiceOverEggs
Votes: 0
Answers: 1
React cancel callback when calling it multiple times
Im trying to update some code. You can change dates and when you change a day the useEffect() is called. The problem is that you can click on a new date whenever the first promise is still loading. I ...
Bo G
Votes: 0
Answers: 1
how to use useEffect and useContext with fetching data?
I'm trying to use React's Context API as well as Hooks with fetching data.
I'm coding [createContext] like below, but it doesn't work.
import { createContext, useEffect } from "react";
expo...
Yuzu
Votes: 0
Answers: 1