skip to Main Content

my useState array doesn't update using spread method even when i'm doing to a copy array – Reactjs

export default function Calculator(props){ const [userInput, setUserInput] = useState('') const [operator,setOperator]= useState('') const [equationNumbers,setEquationNumbers] = useState([]) const [result, setResult]= useState(0) /* doing the operation + - * / to the result array element */ function Calculate(operator){ /* if user want…

VIEW QUESTION
Back To Top
Search