inertia-react-development

Implements Inertia.js v3 React pages, forms, navigation, and client-side data features.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/rizalord/livecode-ptbeon --skill inertia-react-development-rizalord
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: inertia-react-development
Source: https://github.com/rizalord/livecode-ptbeon/tree/main/src/backend/.grok/skills/inertia-react-development
Command: npx skills add https://github.com/rizalord/livecode-ptbeon --skill inertia-react-development-rizalord

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building React frontends inside Laravel applications often leads to broken SPA behavior, incorrect form handling, and missed Inertia v3 features. This Skill provides correct patterns for Inertia.js v3 React development so pages, forms, and navigation work with the Inertia protocol instead of against it. ## Core Features & Use Cases - Page Components & Navigation: Create React page components in resources/js/pages and use <Link> and router for client-side navigation with prefetching. - Form Handling: Build forms with the <Form> component or useForm hook, including error display, processing states, and automatic reset behavior. - Inertia v3 Features: Apply deferred props, optimistic updates, instant visits, layout props, polling, WhenVisible, InfiniteScroll, and the useHttp hook for plain JSON endpoints. - Use Case: When adding a user creation page to a Laravel + React app, use this Skill to scaffold the page component, wire up a <Form> with validation errors, and add prefetching links for fast navigation. ## Quick Start Use the inertia-react-development skill to create a React page component with a form that posts to a Laravel route and displays validation errors.

Frequently Asked Questions about inertia-react-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a form in React with Inertia.js?▼

Use the `<Form>` component from @inertiajs/react with an action and method, rendering errors and processing state via its render prop. For programmatic control, use the `useForm` hook with data, setData, and post, calling e.preventDefault() on submit.

How do I handle client-side navigation in Inertia React?▼

Use the `<Link>` component from @inertiajs/react instead of plain `<a>` tags to preserve SPA behavior. For programmatic navigation, call router.visit with a URL and optional method, data, and callbacks like onSuccess.

What is the difference between useForm and useHttp in Inertia v3?▼

useForm submits data as Inertia visits that trigger page transitions, while useHttp sends standalone requests to plain JSON endpoints without triggering an Inertia page visit. Both share a similar API with data, setData, and processing state.

Does Inertia React support prefetching and deferred props?▼

Yes. Add the prefetch prop to `<Link>` to load pages on hover, and use deferred props on the server so data loads after the initial render. Handle the undefined state of deferred props with loading skeletons in the component.

Why does my Inertia React form submit as a full page reload?▼

This happens when using a native `<form>` element without preventing the default submission. Use the `<Form>` component or call e.preventDefault() in your submit handler when using useForm so the request goes through Inertia.

What breaking changes exist in Inertia v3 router events?▼

In v3, router.cancel() was replaced by router.cancelAll(), and the invalid and exception events were renamed to httpException and networkError. Update event listeners and cancellation calls accordingly when migrating.