Skip to content

Commit 5bfa7d3

Browse files
committed
formatting
1 parent 6fb5a8b commit 5bfa7d3

File tree

7 files changed

+22
-20
lines changed

7 files changed

+22
-20
lines changed

.ai/inertia-laravel/2/core.blade.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
### Deferred Props & Empty States
1313
- When using deferred props on the frontend, you should add a nice empty state with pulsing / animated skeleton.
1414

15-
## Inertia Forms Core
16-
@if($assist->inertia()->hasFormComponent())
17-
- The recommended way to build forms when using Inertia is with the `<Form>` component, a useful example is below. Use `search-docs` with the `form component` query for guidance.
18-
- Forms can also be built using the `useForm` helper for more programmatic control, or to follow existing conventions. Use `search-docs` with the `useForm helper` query for guidance.
19-
@if($assist->inertia()->hasFormComponentResets())
20-
- `resetOnError`, `resetOnSuccess`, and `setDefaultsOnSuccess` are available on the `<Form>` component. Use `search-docs` with 'form component resetting' for explicit guidance.
15+
### Inertia Form General Guidance
16+
@if ($assist->inertia()->hasFormComponent())
17+
- The recommended way to build forms when using Inertia is with the `<Form>` component - a useful example is below. Use `search-docs` with a query of `form component` for guidance.
18+
- Forms can also be built using the `useForm` helper for more programmatic control, or to follow existing conventions. Use `search-docs` with a query of `useForm helper` for guidance.
19+
@if ($assist->inertia()->hasFormComponentResets())
20+
- `resetOnError`, `resetOnSuccess`, and `setDefaultsOnSuccess` are available on the `<Form>` component. Use `search-docs` with a query of 'form component resetting' for guidance.
2121
@else
22-
- This version of Inertia does NOT support `resetOnError`, `resetOnSuccess`, or `setDefaultsOnSuccess` on the `<Form>` component. Using these will cause errors.
22+
- This version of Inertia does not support `resetOnError`, `resetOnSuccess`, or `setDefaultsOnSuccess` on the `<Form>` component. Using these will cause errors.
2323
@endif
2424
@else
25-
- Build forms using the `useForm` helper. Use the code examples and `search-docs` tool with the `useForm helper` query for guidance.
25+
- Build forms using the `useForm` helper. Use the code examples and `search-docs` tool with a query of `useForm helper` for guidance.
2626
@endif

.ai/inertia-react/1/forms.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Forms in Inertia
1+
## Inertia Forms
22

33
- For form handling in Inertia pages, use `router.post` and related methods. Do not use regular forms.
44

.ai/inertia-react/2/forms.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@php
22
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
33
@endphp
4-
## Forms in Inertia
4+
## Inertia Forms
55

66
@if($assist->inertia()->hasFormComponent())
7-
@boostsnippet("Example form using the `<Form>` component", "react")
7+
@boostsnippet("`<Form>` Component Example", "react")
88
import { Form } from '@inertiajs/react'
99

1010
export default () => (
@@ -38,7 +38,7 @@
3838

3939
@if($assist->inertia()->hasFormComponent() === false)
4040
{{-- Inertia 2.0.x, not 2.1.0 or higher. So they still need to use 'useForm' --}}
41-
@boostsnippet("Inertia React useForm example", "react")
41+
@boostsnippet("Inertia React useForm Example", "react")
4242
import { useForm } from '@inertiajs/react'
4343

4444
const { data, setData, post, processing, errors } = useForm({

.ai/inertia-svelte/1/forms.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Forms in Inertia
1+
## Inertia Forms
22

33
- For form handling, use `router.post` and related methods. Do not use regular forms.
44

.ai/inertia-svelte/2/forms.blade.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
@php
22
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
33
@endphp
4-
## Forms in Inertia
4+
## Inertia Forms
5+
56
- There are critical differences between Svelte 4 and 5, use the `search-docs` tool for up-to-date guidance.
7+
68
@if($assist->inertia()->hasFormComponent())
7-
@boostsnippet("Example form using the `<Form>` component", "svelte5")
9+
@boostsnippet("`<Form>` Component Example", "svelte5")
810
<Form action="/users" method="post">
911
{#snippet children({
1012
errors,
@@ -41,7 +43,7 @@
4143

4244
@if($assist->inertia()->hasFormComponent() === false)
4345
{{-- Inertia 2.0.x, not 2.1.0 or higher. So they still need to use 'useForm' --}}
44-
@boostsnippet("Inertia React useForm example", "svelte")
46+
@boostsnippet("Inertia Svelte useForm Example", "svelte")
4547
<script>
4648
import { useForm } from '@inertiajs/svelte'
4749

.ai/inertia-vue/1/forms.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Forms in Inertia
1+
## Inertia Forms
22

33
- For form handling in Inertia pages, use `router.post` and related methods. Do not use regular forms.
44

.ai/inertia-vue/2/forms.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@php
22
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
33
@endphp
4-
## Forms in Inertia
4+
## Inertia Forms
55

66
@if($assist->inertia()->hasFormComponent())
7-
@boostsnippet("Example form using the `<Form>` component", "vue")
7+
@boostsnippet("`<Form>` Component Example", "vue")
88
<Form
99
action="/users"
1010
method="post"
@@ -41,7 +41,7 @@
4141

4242
@if($assist->inertia()->hasFormComponent() === false)
4343
{{-- Inertia 2.0.x, not 2.1.0 or higher. So they still need to use 'useForm' --}}
44-
@boostsnippet("Inertia React useForm example", "vue")
44+
@boostsnippet("Inertia Vue useForm example", "vue")
4545
<script setup>
4646
import { useForm } from '@inertiajs/vue3'
4747

0 commit comments

Comments
 (0)