From 7d77a7d405b15ae21baafa90225529009c046d35 Mon Sep 17 00:00:00 2001 From: jlmodell <48035911+jlmodell@users.noreply.github.com> Date: Fri, 13 Aug 2021 10:14:40 -0400 Subject: [PATCH] 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. --- ts-router/src/pages/about.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ts-router/src/pages/about.tsx b/ts-router/src/pages/about.tsx index 771c86d..a08efb6 100644 --- a/ts-router/src/pages/about.tsx +++ b/ts-router/src/pages/about.tsx @@ -1,15 +1,20 @@ import { Suspense } from "solid-js"; +import { useData } from "solid-app-router"; -export default function About(props) { +export default function About() { + const data = useData(); + return (

About

A page all about this website.

- -
-        {JSON.stringify(props, null, 2)}
-      
+ + +
+          {JSON.stringify(data, null, 2)}
+        
+
); }