I have 4 inputs that update a react state when there is text typed inside, only one of them tends to update for some reason and I can't find out why, there are no typing errors and I have checked the imports, state names, and inputs to make sure that they work correctly. Is there another factor that I'm missing here? thanks in advance
import React, {useState, useEffect} from "react";
export default function Home() {
const [a, setA] = useState()
const [b, setB] = useState()
const [c, setC] = useState()
const [d, setD] = useState()
return (
<>
<input onChange={(e) => setA(e.target.value)} />
<input onChange={(e) => setB(e.target.value)} />
<input onChange={(e) => setC(e.target.value)} />
<input onChange={(e) => setD(e.target.value)} />
<p style={{color:'white'}}>
{a, b, c, d}
</p>
</>
);
}
I have tried changing the state names to different things, I have retyped all inputs manually multiple times, and I have checked the imports to make sure they work. I have also tried having the states start with (' ') or (), but both didn't work.