File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/routes/solid-router/advanced-concepts Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,14 @@ import { Router, Route } from "@solidjs/router";
13
13
14
14
const Home = () => import (" ./Home" );
15
15
const Users = lazy (() => import (" ./Users" ));
16
-
17
16
const App = () => (
18
17
< Router>
19
- < Route path= " /" element = {< Home / > } / >
20
- < Route path= " /users" element = {< Users / > } / >
18
+ < Route path= " /" component = {< Home / > } / >
19
+ < Route path= " /users" component = {< Users / > } / >
21
20
< / Router>
22
21
);
23
22
```
24
23
25
24
In the example above, the ` Home ` component is lazy loaded using the ` lazy ` function.
26
25
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.
You can’t perform that action at this time.
0 commit comments