Skip to content

Commit ab12c15

Browse files
authored
replace element= with component= (#831)
1 parent 75c20c3 commit ab12c15

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ import { Router, Route } from "@solidjs/router";
1313

1414
const Home = () => import("./Home");
1515
const Users = lazy(() => import("./Users"));
16-
1716
const App = () => (
1817
<Router>
19-
<Route path="/" element={<Home />} />
20-
<Route path="/users" element={<Users />} />
18+
<Route path="/" component={<Home />} />
19+
<Route path="/users" component={<Users />} />
2120
</Router>
2221
);
2322
```
2423

2524
In the example above, the `Home` component is lazy loaded using the `lazy` function.
2625
The `lazy` function takes a function that returns a promise, which resolves to the component you want to load.
27-
When the route is matched, the component will be loaded and rendered.
26+
When the route is matched, the component will be loaded and rendered.

0 commit comments

Comments
 (0)