--- description: Migrate a React component from thrillwiki-87 to Vue/Nuxt --- # Migrate Component Workflow Convert a React component from thrillwiki-87 (the authoritative source) to Vue 3 Composition API for the Nuxt 4 project. ## Step 1: Locate Source Component Find the React component in thrillwiki-87: ```bash # React components are in: /Volumes/macminissd/Projects/thrillwiki-87/src/components/ ``` Common component directories: - `auth/` - Authentication components - `parks/` - Park-related components - `rides/` - Ride-related components - `forms/` - Form components - `moderation/` - Moderation queue components - `ui/` - Base UI primitives (shadcn-ui) - `common/` - Shared utilities - `layout/` - Layout components ## Step 2: Analyze React Component Extract these patterns from the source: ```tsx // Props interface interface ComponentProps { prop1: string prop2?: number } // State hooks const [value, setValue] = useState(initial) // Effects useEffect(() => { /* logic */ }, [deps]) // Event handlers const handleClick = () => { /* logic */ } // Render return return ``` ## Step 3: Translate to Vue 3 ### Props ```tsx // React interface Props { name: string; count?: number } ``` ↓ ```vue ``` ### State ```tsx // React const [value, setValue] = useState('') ``` ↓ ```vue ``` ### Effects ```tsx // React useEffect(() => { fetchData() }, [id]) ``` ↓ ```vue ``` ### Events ```tsx // React onClick={() => onSelect(item)} ``` ↓ ```vue @click="emit('select', item)" ``` ## Step 4: Map UI Components Translate shadcn-ui to Nuxt UI: | shadcn-ui | Nuxt UI | |-----------|---------| | `