Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / user-mock.data.ts
Created June 30, 2025 18:17
Data de pruebas para el curso de React de cero a experto
export interface User {
id: number;
name: string;
title: string;
tags: string[];
contact: Contact;
about: string;
experience: Experience[];
stats: Stats;
skills: string[];
@Klerith
Klerith / InstagromApp.tsx
Last active June 27, 2025 16:00
Gist para el ejercicio sobre useOptimistic
import { useState } from 'react';
interface Comment {
id: number;
text: string;
optimistic?: boolean;
}
export const InstagromApp = () => {
const [comments, setComments] = useState<Comment[]>([
@Klerith
Klerith / ScrambleWords.tsx
Created June 25, 2025 14:21
Código de la tarea para practicar el useReducer y useState
// ! Importante:
// Es necesario componentes de Shadcn/ui
// https://ui.shadcn.com/docs/installation/vite
import React, { useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Card, CardContent } from '@/components/ui/card';
import { SkipForward, Play } from 'lucide-react';
@Klerith
Klerith / TaskApp.tsx
Last active June 23, 2025 15:35
Aplicación de tareas para empezar el ejemplo de useReducer
import { useState } from 'react';
import { Plus, Trash2, Check } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Checkbox } from '@/components/ui/checkbox';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
interface Todo {
@Klerith
Klerith / ScrambleWords.tsx
Last active June 23, 2025 14:21
Componente para el juego ScramleWords y la necesidad de un useReducer
// ! Importante:
// Es necesario componentes de Shadcn/ui
// https://ui.shadcn.com/docs/installation/vite
import React, { useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Card, CardContent } from '@/components/ui/card';
import { SkipForward, Play } from 'lucide-react';
@Klerith
Klerith / TrafficLight.tsx
Last active June 19, 2025 17:08
Diseño de un componente tipo semáforo
export const TrafficLight = () => {
return (
<div className="min-h-screen bg-gradient-to-br from-slate-900 via-gray-900 to-slate-800 flex items-center justify-center p-4">
<div className="flex flex-col items-center space-y-8">
<div className="w-32 h-32 bg-red-500 rounded-full"></div>
<div className="w-32 h-32 bg-yellow-500 rounded-full"></div>
@Klerith
Klerith / testing-configuration.md
Last active July 7, 2025 22:11
Configuración de Vitest + React Testing Library
@Klerith
Klerith / instalaciones-react.md
Last active June 28, 2025 05:56
Instalaciones para el curso de React de cero a experto
@Klerith
Klerith / instalaciones-expo-gemini.md
Created May 9, 2025 15:53
Instalaciones para el curso de Gemini con React Native y Expo
@Klerith
Klerith / trivia-maker-gemini.txt
Created April 29, 2025 13:23
Generar preguntas de trivia
Eres un generador de trivias, se te pedirán preguntas de conocimiento general
y debes de generar 3 respuestas incorrectas y una correcta
El indice debe de variar de posición, de vez en cuando genera una pregunta súper complicada de responder
{
question: "aquí es donde va la pregunta general"
answers: [
"answer 1",
"answer 2",
"answer 3",