Packages

E2E reactivity for SolidJS and LiveView

Current section

Files

Jump to
live_solidjs assets copy solidjs-components link-example.jsx
Raw

assets/copy/solidjs-components/link-example.jsx

import { Link } from "live_solidjs";
export function LinkExample(props) {
return (
<div class="space-y-4 p-4">
<h2 class="text-xl font-bold">Link Component Examples</h2>
<div class="space-y-2">
<p>
<Link href="/external" class="text-blue-600 hover:underline">
External Link (full page reload)
</Link>
</p>
<p>
<Link patch="/same-liveview" class="text-green-600 hover:underline">
Patch Link (same LiveView, calls handle_params)
</Link>
</p>
<p>
<Link navigate="/other-liveview" class="text-purple-600 hover:underline">
Navigate Link (different LiveView, same session)
</Link>
</p>
<p>
<Link
navigate="/replace-history"
replace={true}
class="text-red-600 hover:underline"
>
Replace History (navigate with replace)
</Link>
</p>
</div>
</div>
);
}