import { useCallback } from "react"

export function useInputOnChange(setState: (value: string) => void) {
  return useCallback(
    (e: React.ChangeEvent<HTMLInputElement>) => {
      setState(e.target.value)
    },
    [setState],
  )
}
