DEV Community

Discussion on: React hooks & the closure hell

Collapse
 
timkindberg profile image
Tim Kindberg
const handleClick = useCallback(
  () => {
    setValue(oldValue => oldValue + 1)
  },
  []
)