Get up and running with next-lovable in 5 minutes
Navigation.tsx
import React from 'react'; import { Link, useNavigate, useLocation } from 'react-router-dom'; export const Navigation = () => { const navigate = useNavigate(); const location = useLocation(); const handleLogout = () => { navigate('/login'); }; return ( <nav className="navbar"> <Link to="/" className="nav-link">Home</Link> <Link to="/about" className="nav-link">About</Link> <Link to="/contact" className="nav-link">Contact</Link> <button onClick={handleLogout}>Logout</button> <span>Current path: {location.pathname}</span> </nav> ); };
next-lovable convert Navigation.tsx --dry-run --show-diff
next-lovable convert Navigation.tsx
import { Link, useNavigate, useLocation } from 'react-router-dom'; export const Navigation = () => { const navigate = useNavigate(); const location = useLocation(); // ... rest of component
# Test all components in a directory next-lovable convert src/components/*.tsx --dry-run # Test specific transformation types only next-lovable convert MyComponent.tsx --transform router,client --dry-run
next-lovable convert src/Navigation.tsx --output converted/Navigation.tsx
next-lovable convert --list
Try More Components
Learn About Full Migration
Explore Examples