Skip to content

Commit afb5633

Browse files
committed
Load Home component lazily
1 parent e298955 commit afb5633

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/routes/solid-router/advanced-concepts/lazy-loading.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ In Solid Router, you can lazy load components using the `lazy` function from Sol
1111
import { lazy } from "solid-js";
1212
import { Router, Route } from "@solidjs/router";
1313

14-
const Home = () => import("./Home");
14+
const Home = lazy(() => import("./Home"));
15+
1516
const Users = lazy(() => import("./Users"));
17+
1618
const App = () => (
1719
<Router>
1820
<Route path="/" component={Home} />

0 commit comments

Comments
 (0)