How gereac/aitest works
This is a minimal React starter UI: the browser loads the React entry point, which renders a greeting and theme-toggle control. The App component uses a theme hook that initializes from saved preference or the system setting, then applies and persists changes. Styling is imported by the entry point; its implementation was not sampled. The graph reflects the shown runtime calls and browser APIs, not the Vite build setup.
Main entry points: useTheme.ts Theme hook · App.tsx Greeting and toggle · main.tsx React entry · index.css Global styles
Components 8
Other components
- User
- React entry
src/main.tsx - Greeting and toggle
src/App.tsx - Theme hook
src/hooks/useTheme.ts - Global styles
src/index.css - Browser storage
- System theme
- Browser document
Connections 7
- User → Greeting and toggle: uses toggle
src/App.tsx - React entry → Greeting and toggle: renders
src/main.tsx - React entry → Global styles: imports styles
src/main.tsx - Greeting and toggle → Theme hook: uses hook
src/App.tsx - Theme hook → Browser storage: reads and writes
src/hooks/useTheme.ts - Theme hook → System theme: checks preference
src/hooks/useTheme.ts - Theme hook → Browser document: sets theme class
src/hooks/useTheme.ts