Can Anyone tell me the difference between this :

```
function IntervalHookCounter() {
const [count,setCount] = useState(0)

useEffect(()=>{
    const interval = setInterval(tick,1000)
},[])

const tick = ()=>{
    setCount(count+1)
}

```

And this :

```
function IntervalHookCounter() {
const [count,setCount] = useState(0)

useEffect(()=>{
    const interval = setInterval(tick,1000)
},[])

const tick = ()=>{
    setCount(prevState=>prevState+1)
}

```

I don't understand why the first one is not woriking.