Skip to content

Instantly share code, notes, and snippets.

View adlf-aldana's full-sized avatar
馃彔
Working from home

Adolfo adlf-aldana

馃彔
Working from home
View GitHub Profile
@adlf-aldana
adlf-aldana / useForm.js
Created July 6, 2024 01:51 — 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 ])
@adlf-aldana
adlf-aldana / vite-testing-config.md
Created October 24, 2022 00:54 — forked from Klerith/vite-testing-config.md
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalaci贸n y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto: