export const useForm = <C, S = { [key: string]: string }>
(
callback: (C?: any) => void,
initState: S,
validator: (validationData: S) => { errors: Array<string>, valid: boolean }
) => {
const [values, setValues] = useState<S>(initState)