Skip to content

Instantly share code, notes, and snippets.

View SamCode011's full-sized avatar
📚

Sam SamCode011

📚
View GitHub Profile
@SamCode011
SamCode011 / templateSlice.js
Created April 13, 2024 17:43 — 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
@SamCode011
SamCode011 / heroes-with-desc.js
Created February 18, 2024 14:56 — forked from Klerith/heroes-with-desc.js
Una colección de Super Héroes
export const heroes = [
{
'id': 'dc-batman',
'superhero':'Batman',
'publisher':'DC Comics',
'alter_ego':'Bruce Wayne',
'first_appearance':'Detective Comics #27',
'characters':'Bruce Wayne'
},
{
@SamCode011
SamCode011 / vite-testing-config.md
Created January 21, 2024 21:14 — 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:

Tarea

  1. Crear un nuevo componente dentro de la carpeta SRC llamado CounterApp

  2. El CounterApp debe de ser un Functional Component

  3. El contenido del CounterApp debe de ser:

CounterApp

@SamCode011
SamCode011 / heroes.js
Created January 5, 2024 19:28 — forked from Klerith/heroes.js
Un pequeño arreglo de héroes para hacer ejercicios
const heroes = [
{
id: 1,
name: 'Batman',
owner: 'DC'
},
{
id: 2,
name: 'Spiderman',
owner: 'Marvel'
@SamCode011
SamCode011 / react-index.html
Created January 3, 2024 06:03 — forked from Klerith/react-index.html
Introducción a React
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- Cargat React -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
@SamCode011
SamCode011 / Instalaciones-React.md
Created January 3, 2024 04:47 — forked from Klerith/Instalaciones-React.md
Instalaciones recomendadas para mi curso de React de cero a experto