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.
21 lines
475 B
TypeScript
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>
|
|
);
|
|
}
|