arrow_backBACK TO DRILLS
Blue Beltstate-basics
Storing functions in state
“A developer writes const [fn, setFn] = useState(someFunction), intending to store someFunction itself in state. Instead, React calls the function. Why?”
“A developer writes const [fn, setFn] = useState(someFunction), intending to store someFunction itself in state. Instead, React calls the function. Why?”