Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.
Inertia React Development
When to Apply
Activate this skill when:
Creating or modifying React page components for Inertia
Working with forms in React (using <Form> or useForm)
Implementing client-side navigation with <Link> or router
Using v2 features: deferred props, prefetching, or polling
Building React-specific features with the Inertia protocol
Documentation
Use search-docs for detailed Inertia v2 React patterns and documentation.
Basic Usage
Page Components Location
React page components should be placed in the resources/js/pages directory.
Page Component Structure
export default function UsersIndex({ users }) {
return (
Users
{users.map(user =>
{user.name}
)}
)
}
Client-Side Navigation
Basic Link Component
Use <Link> for client-side navigation instead of traditional <a> tags:
import { Link, router } from '@inertiajs/react'
Home
Users
View User
Link with Method
import { Link } from '@inertiajs/react'
Logout
Prefetching
Prefetch pages to improve perceived performance:
import { Link } from '@inertiajs/react'
Users
Programmatic Navigation
import { router } from '@inertiajs/react'
function handleClick() {
router.visit('/users')
}
// Or with options
router.visit('/users', {
method: 'post',
data: { name: 'John' },
onSuccess: () => console.log('Success!'),
})
Form Handling
Form Component (Recommended)
The recommended way to build forms is with the <Form> component: