Skip to content

Instantly share code, notes, and snippets.

View DanielGomezIH's full-sized avatar
🚀
Creating!

Daniel Iván Gómez Hortúa DanielGomezIH

🚀
Creating!
  • Bogotá, Colombia
  • 23:00 (UTC -05:00)
View GitHub Profile
@DanielGomezIH
DanielGomezIH / templateSlice.js
Created July 9, 2024 17:40 — forked from Klerith/templateSlice.js
Cascaron para crear Redux Slices rápidamente
import { createSlice } from '@reduxjs/toolkit';
export const templateSlice = createSlice({
name: 'name',
initialState: {
counter: 10
},
reducers: {
increment: (state, /* action */ ) => {
//! https://react-redux.js.org/tutorials/quick-start
@DanielGomezIH
DanielGomezIH / git-alias.md
Created July 6, 2024 17:20 — forked from Klerith/git-alias.md
Useful Git Alias

Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s status --short

Alternativa útil de status

git config --global alias.s status -sb

@DanielGomezIH
DanielGomezIH / vite-testing-config.md
Last active August 14, 2024 19:31 — 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. Cambiar module.export = {} del archivo eslintrc.cjs a export default {}.

  2. Instalaciones:

npm add --dev jest babel-jest @babel/preset-env @babel/preset-react 
npm add --dev @testing-library/react @types/jest jest-environment-jsdom