Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 30, 2024
2 parents 9f3a80f + 17509cd commit 2b0ac76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/routes/solid-router/advanced-concepts/lazy-loading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ In Solid Router, you can lazy load components using the `lazy` function from Sol
import { lazy } from "solid-js";
import { Router, Route } from "@solidjs/router";

const Home = () => import("./Home");
const Home = lazy(() => import("./Home"));

const Users = lazy(() => import("./Users"));

const App = () => (
<Router>
<Route path="/" component={<Home />} />
<Route path="/users" component={<Users />} />
<Route path="/" component={Home} />
<Route path="/users" component={Users} />
</Router>
);
```
Expand Down

0 comments on commit 2b0ac76

Please sign in to comment.