Why does the count increase by two each time using setinterval in react,The React version is 18
const [count, setCount] = useState(0)
useEffect(() => {
setInterval(() => {
setCount(count => count + 1)
}, 1000)
}, [])
return (
<div>{count}</div>
)