Skip to content

Instantly share code, notes, and snippets.

View itsaalexk's full-sized avatar
:electron:
Focusing

Alex itsaalexk

:electron:
Focusing
View GitHub Profile
@itsaalexk
itsaalexk / useForm.js
Created February 14, 2023 08:06 — forked from Klerith/useForm.js
useForm con Validaciones
import { useEffect, useMemo, useState } from 'react';
export const useForm = ( initialForm = {}, formValidations = {}) => {
const [ formState, setFormState ] = useState( initialForm );
const [ formValidation, setFormValidation ] = useState({});
useEffect(() => {
createValidators();
}, [ formState ])