$ recombobulate _
home / tips / generate-inertiajs-page-components-with-claude
generate-inertiajs-page-components-with-claude

Inertia.js bridges your Laravel backend and your Vue or React frontend, but wiring up page components to props still involves boilerplate. Claude can generate the whole thing from your controller.

cat app/Http/Controllers/InvoiceController.php | claude "Generate a Vue 3 Inertia page component for the index method. The props include a paginated list of invoices with customer name, amount, and status. Add a search field and a status filter."

Claude understands the Inertia pattern — it will use defineProps with the correct shape, wire up router.get() for filtering, and handle pagination with Inertia's built-in Link component.

For React projects, just say so:

claude "Generate a React Inertia page component for a dashboard that receives { user, recentOrders, stats } props. Use TypeScript."

Claude will also add useForm for any mutations, keeping your Inertia workflow idiomatic end-to-end:

<script setup>
const form = useForm({ search: props.filters.search })
const submit = () => form.get(route('invoices.index'))
</script>

Describe the data, skip the boilerplate.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 2 hours ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 2 hours ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago