import { useEffect, useState } from 'react'; interface Status { status: string; runtime: string; viteVersion: string; } export default function App() { const [status, setStatus] = useState(null); const [count, setCount] = useState(0); useEffect(() => { // Example: fetch a backend status endpoint if you wire one up setStatus({ status: 'running', runtime: import.meta.env.VITE_RUNTIME ?? 'docker', viteVersion: '5.x', }); }, []); return (

🌊 Shiplet — React + Vite + SWC

Running inside Docker via Shiplet. HMR is active — edit this file and save.

Stack

  • React 18 + TypeScript
  • Vite 5 with SWC (faster than Babel)
  • pnpm package manager
  • Redis (available at redis:6379)
  • HMR configured for Docker (usePolling: true)
{status && (

Runtime status

Container runtime: {status.runtime}

Status: {status.status}

)}

Counter demo

Edit src/App.tsx and save — Vite HMR will update instantly.

Useful commands:
{[
          'shiplet up -d              # Start containers',
          'shiplet pnpm install       # Install deps inside container',
          'shiplet pnpm run dev       # Start Vite dev server (or it auto-starts)',
          'shiplet logs -f app        # Follow logs',
          'shiplet db redis           # Open redis-cli',
          'shiplet dashboard          # Web UI → http://localhost:6171',
        ].join('\n')}
); }