Rule Title
Brief explanation of what this rule covers and why it matters for Laravel + Inertia.js + React development.
Bad Example
// Anti-pattern: What NOT to do
// Explain why this approach is problematicGood Example
// Correct approach: Best practice implementation
// resources/js/Pages/Example.tsx
import { useForm } from '@inertiajs/react';
// Full working example with TypeScript
export default function Example() {
// Implementation
}Laravel Backend (if applicable)
// app/Http/Controllers/ExampleController.php
<?php
namespace App\Http\Controllers;
use Inertia\Inertia;
use Inertia\Response;
class ExampleController extends Controller
{
public function index(): Response
{
return Inertia::render('Example', [
// Props
]);
}
}Why
This pattern is important because:
- Reason 1: Explanation of first benefit
- Reason 2: Explanation of second benefit
- Reason 3: Explanation of third benefit
- Performance: Performance implications
- Type Safety: TypeScript benefits
- Developer Experience: DX improvements
- Maintainability: Long-term maintenance benefits