diff --git a/examples/ssr/shared/src/components/Home.js b/examples/ssr/shared/src/components/Home.js index 55bd3d68..0d9366e9 100644 --- a/examples/ssr/shared/src/components/Home.js +++ b/examples/ssr/shared/src/components/Home.js @@ -1,21 +1,14 @@ -import { createSignal, onSettled } from "solid-js"; +import { createSignal, createMemo } from "solid-js"; const Home = () => { - const [s, set] = createSignal(0); - onSettled(() => { - const t = setInterval(() => { - const newVal = s() + 1; - set(newVal); - }, 100); - return () => { - clearInterval(t); - }; - }); + const [n, setN] = createSignal(0); + const doubleQuery = createMemo(() => n() * 2); + return ( - <> -

Welcome to this Simple Routing Example

-

Click the links in the Navigation above to load different routes.

- {s()} - +
+
n: {n()}
+
double: {doubleQuery()}
+ +
); };