Files
solidjs-templates/ts-router/src/pages/about.tsx
T
jlmodellandGitHub 7d77a7d405 Update about.tsx
It looks like the data is not passed through props any longer (?) and the example on the solid-app-router page uses this 'useData' hook to get the data passed in from the route definition.
2021-08-13 10:14:40 -04:00

21 lines
475 B
TypeScript

import { Suspense } from "solid-js";
import { useData } from "solid-app-router";
export default function About() {
const data = useData();
return (
<section class="bg-pink-100 text-gray-700 p-8">
<h1 class="text-2xl font-bold">About</h1>
<p class="mt-4">A page all about this website.</p>
<Suspense>
<pre class="mt-4">
<code>{JSON.stringify(data, null, 2)}</code>
</pre>
</Suspense>
</section>
);
}