-
-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bc58a5
commit e3ed4ee
Showing
5 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Link } from '@inertiajs/react' | ||
import { useState } from 'react' | ||
|
||
export default () => { | ||
const [href, setHref] = useState('/sleep') | ||
|
||
return ( | ||
<div> | ||
<button onClick={() => setHref('/something-else')}>Change URL</button> | ||
<Link href={href} class="get"> | ||
The Link | ||
</Link> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script> | ||
import { Link } from '@inertiajs/svelte' | ||
let href = '/sleep'; | ||
const changeUrl = () => { | ||
href = '/something-else'; | ||
} | ||
</script> | ||
|
||
<div> | ||
<button on:click={changeUrl}>Change URL</button> | ||
<Link href={href} class="get"> | ||
The Link | ||
</Link> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script setup> | ||
import { Link } from '@inertiajs/vue3' | ||
import { ref } from 'vue' | ||
const href = ref('/sleep') | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<button @click.prevent="href = '/something-else'">Change URL</button> | ||
<Link :href="href">The Link</Link> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters