Saltar al contenido
Plantilla de proyecto·Pro

Vite + React + TypeScript

Un registro de hábitos en React y TypeScript, hecho con Vite 8: rejilla semanal, rachas, un hook propio y un test. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 25 paquetes (unos 80 MB).

Para instalarlo necesitas PocketCode Pro.

Si tienes PocketCode instalado en tu Android, esto abre la página en la app.

Vista previa

Ficheros

README.md
index.html
package-lock.json
package.json
public/favicon.svg
src/App.tsx
src/index.css
src/main.tsx
src/useLocalStorage.ts
src/week.ts
test/week.test.ts
tsconfig.json
vite.config.ts

README.md

# Habit tracker: Vite + React + TypeScript A small React app in TypeScript, built with Vite: a weekly grid of habits you tick off day by day, with a streak counter. Habits are saved in the browser (localStorage). It shows the usual pieces of a React project: components, state, a custom hook, typed data and a test. ## Run it in PocketCode You need the app's Linux environment with Node.js 20.19 or newer (the Developer pack in Terminal › Linux includes Node.js and npm). 1. Open the terminal in this project's folder (Open Terminal Here, in the editor menu). 2. Install the dependencies. The first time downloads about 25 packages (around 80 MB on disk) and needs internet: ```sh npm install ``` 3. Start the development server: ```sh npm run dev ``` 4. Open http://localhost:5173 in the DevBrowser (or in the phone's browser). Saving a file updates the page. Stop the server with Ctrl+C in the terminal. ## Other commands | Command | What it does | |---|---| | `npm run build` | Type-checks with `tsc` and writes the production build to `dist/` | | `npm run preview` | Serves `dist/` on http://localhost:4173 | | `npm run typecheck` | Only the type check | | `npm test` | Tests for `src/week.ts` with Node's test runner (Node 22.18 or newer) | ## Where things are | Path | What it does | |---|---| | `index.html` | The page Vite serves; it loads `src/main.tsx` | | `src/App.tsx` | The app: form, weekly grid, streaks |

Esta vista previa está recortada. El contenido completo llega al instalarlo.

Cambios en la 1.0.0

Primera versión.

Relacionados

Next.js + Tailwind + i18nProPlantilla de proyectoProyecto de Next.js 15 con next-intl y Tailwind CSS, y una página en inglés y español en /en y /es. El modo oscuro sigue al sistema. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 400 MB.Vite + Vue + TypeScriptProPlantilla de proyectoUn temporizador de concentración en Vue 3 y TypeScript, hecho con Vite 8: sesiones de trabajo, descansos, el total de hoy, dos composables y un test. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 50 paquetes (unos 85 MB).Vite + Svelte + TypeScriptProPlantilla de proyectoTarjetas de estudio en Svelte 5 y TypeScript, hechas con Vite 8. Cada tarjeta pasa por cinco cajas de Leitner y vuelve cuando toca repasarla. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 45 paquetes (unos 75 MB).Lista de tareas en JavaScript puroProPlantilla de proyectoUna lista de tareas con módulos de JavaScript puro: añade, edita en el sitio, marca, filtra y borra lo hecho; se guarda en localStorage. La lógica tiene tests para el ejecutor de tests de Node. Funciona en el DevBrowser y con el Node.js de la app, sin Linux.Botón (React + Tailwind)GratisBotónBotón en TypeScript con estilo principal y secundario, anillo de foco visible y un indicador de carga que además activa aria-busy. El estilo secundario tiene colores para el modo oscuro.Página de aterrizaje estáticaProPlantilla de proyectoUn sitio de una página en HTML y CSS sin más: cabecera con menú plegable, portada, rejilla de funciones, preguntas frecuentes y pie. Los colores siguen el modo claro u oscuro del sistema. No hay que compilar ni hace falta Linux: abre index.html y toca el icono del globo.