Skip to content

Commit ac1a23e

Browse files
committed
wip
1 parent c4859aa commit ac1a23e

4 files changed

Lines changed: 11 additions & 36 deletions

File tree

v2/data-props/partial-reloads.mdx

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -157,34 +157,9 @@ return Inertia::render('Users/Index', [
157157

158158
Here's a summary of each approach:
159159

160-
{/* | Approach | Standard Visits | Partial Reloads | Evaluated | |
160+
| Approach | Standard Visits | Partial Reloads | Evaluated | |
161161
|:--------------------|:---------------|:----------------|:----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
162-
| `User::all()` | ALWAYS | OPTIONALLY | ALWAYS |
163-
| `fn () => User::all()` | ALWAYS | OPTIONALLY | ONLY when needed | |
164-
| `Inertia::optional(fn () => User::all())` | NEVER | OPTIONALLY | ONLY when needed | |
165-
| `Inertia::always(fn () => User::all())` | ALWAYS | ALWAYS | ALWAYS | | */}
166-
167-
168-
```php
169-
return Inertia::render('Users/Index', [
170-
// ALWAYS included on standard visits
171-
// OPTIONALLY included on partial reloads
172-
// ALWAYS evaluated
173-
'users' => User::all(),
174-
175-
// ALWAYS included on standard visits
176-
// OPTIONALLY included on partial reloads
177-
// ONLY evaluated when needed
178-
'users' => fn () => User::all(),
179-
180-
// NEVER included on standard visits
181-
// OPTIONALLY included on partial reloads
182-
// ONLY evaluated when needed
183-
'users' => Inertia::optional(fn () => User::all()),
184-
185-
// ALWAYS included on standard visits
186-
// ALWAYS included on partial reloads
187-
// ALWAYS evaluated
188-
'users' => Inertia::always(User::all()),
189-
]);
190-
```
162+
| <span style={{whiteSpace: 'nowrap'}}>`User::all()`</span> | Always | Optionally | Always |
163+
| <span style={{whiteSpace: 'nowrap'}}>`fn () => User::all()`</span> | Always | Optionally | Only When Needed | |
164+
| <span style={{whiteSpace: 'nowrap'}}>`Inertia::optional(fn () => User::all())`</span> | Never | Optionally | Only When Needed | |
165+
| <span style={{whiteSpace: 'nowrap'}}>`Inertia::always(fn () => User::all())`</span> | Always | Always | Always | |

v2/the-basics/file-uploads.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: File Uploads
33
---
44

5-
## Formdata Conversion
5+
## `FormData` Conversion
66

77
When making Inertia requests that include files (even nested files), Inertia will automatically convert the request data into a `FormData` object. This conversion is necessary in order to submit a `multipart/form-data` request via XHR.
88

v2/the-basics/links.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ import { Link } from '@inertiajs/svelte'
6565

6666
</CodeGroup>
6767

68-
<Warning>
68+
<Info>
6969
Creating `POST`/`PUT`/`PATCH`/ `DELETE` anchor `<a>` links is discouraged as it causes "Open Link in New Tab / Window" accessibility issues. The component automatically renders a{` `} `<button>` element when using these methods.
70-
</Warning>
70+
</Info>
7171

7272
## Method
7373

v2/the-basics/title-and-meta.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ The code example above will render the following HTML.
190190

191191
```html
192192
<head>
193-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
194-
<title>About - My app</title>
195-
<meta name="description" content="This is a page specific description" />
193+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
194+
<title>About - My app</title>
195+
<meta name="description" content="This is a page specific description" />
196196
</head>
197197
```
198198

0 commit comments

Comments
 (0)