Skip to content

Commit 0336f8f

Browse files
committed
Update once-props.mdx
1 parent d9ef766 commit 0336f8f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

v2/data-props/once-props.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,32 @@ return Inertia::render('Billing', [
3636
]);
3737
```
3838

39+
## Refreshing from the Client
40+
41+
You may refresh a once prop from the client-side using a [partial reload](/v2/data-props/partial-reloads). The server will always resolve a once prop when explicitly requested.
42+
43+
<CodeGroup>
44+
45+
```js Vue icon="vuejs"
46+
import { router } from '@inertiajs/vue3'
47+
48+
router.reload({ only: ['plans'] })
49+
```
50+
51+
```js React icon="react"
52+
import { router } from '@inertiajs/react'
53+
54+
router.reload({ only: ['plans'] })
55+
```
56+
57+
```js Svelte icon="s"
58+
import { router } from '@inertiajs/svelte'
59+
60+
router.reload({ only: ['plans'] })
61+
```
62+
63+
</CodeGroup>
64+
3965
## Setting an Expiration
4066

4167
You may set an expiration time using the `until()` method. This method accepts a `DateTimeInterface`, `DateInterval`, or an integer (seconds). The prop will be refreshed on a subsequent visit after the expiration time has passed.

0 commit comments

Comments
 (0)