From ab12c151e20dd397c7cc054b5c683e61e640816e Mon Sep 17 00:00:00 2001 From: klequis Date: Mon, 29 Jul 2024 22:10:37 -0700 Subject: [PATCH] replace element= with component= (#831) --- src/routes/solid-router/advanced-concepts/lazy-loading.mdx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/routes/solid-router/advanced-concepts/lazy-loading.mdx b/src/routes/solid-router/advanced-concepts/lazy-loading.mdx index 2d9e45d1f..4664670bd 100644 --- a/src/routes/solid-router/advanced-concepts/lazy-loading.mdx +++ b/src/routes/solid-router/advanced-concepts/lazy-loading.mdx @@ -13,15 +13,14 @@ import { Router, Route } from "@solidjs/router"; const Home = () => import("./Home"); const Users = lazy(() => import("./Users")); - const App = () => ( - } /> - } /> + } /> + } /> ); ``` In the example above, the `Home` component is lazy loaded using the `lazy` function. The `lazy` function takes a function that returns a promise, which resolves to the component you want to load. -When the route is matched, the component will be loaded and rendered. \ No newline at end of file +When the route is matched, the component will be loaded and rendered.