init tanstack

This commit is contained in:
BeauTroll
2026-01-19 09:32:47 +01:00
parent 1e33b87c96
commit 4c8a6e9fd3
34 changed files with 5097 additions and 4 deletions

View File

@@ -0,0 +1,24 @@
import { createFileRoute } from '@tanstack/react-router'
import { getPunkSongs } from '@/data/demo.punk-songs'
export const Route = createFileRoute('/demo/start/ssr/full-ssr')({
component: RouteComponent,
loader: async () => await getPunkSongs(),
})
function RouteComponent() {
const punkSongs = Route.useLoaderData()
return (
<div>
<h1>Full SSR - Punk Songs</h1>
<ul>
{punkSongs.map((song) => (
<li key={song.id}>
{song.name} - {song.artist}
</li>
))}
</ul>
</div>
)
}