--- name: inertia description: How to work effectively with Inertia, always use when developing frontend features --- # Inertia ## Instructions ## Inertia + React - Use `router.visit()` or `` for navigation instead of traditional links. import { Link } from '@inertiajs/react' Home ## Inertia + React Forms import { Form } from '@inertiajs/react' export default () => (
{({ errors, hasErrors, processing, wasSuccessful, recentlySuccessful, clearErrors, resetAndClearErrors, defaults }) => ( <> {errors.name &&
{errors.name}
} {wasSuccessful &&
User created successfully!
} )}
)