Skip to content

Commit 3897748

Browse files
authored
fix: typo in type name (#732)
1 parent dc6b5bd commit 3897748

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/routes/solid-start/building-your-application/data-loading.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Page() {
2323
return (await response.json()) as User[];
2424
});
2525

26-
return <ul>{users() && users()!.map((user) => <li>{user.name}</li>)}</ul>;
26+
return <For each={users()}>{(user) => <li>{user.name}</li>}</For>;
2727
}
2828
```
2929

@@ -54,7 +54,7 @@ export const route = {
5454
export default function Page() {
5555
const users = createAsync(() => getUsers());
5656

57-
return <ul>{users() && users()!.map((user) => <li>{user.name}</li>)}</ul>;
57+
return <For each={users()}>{(user) => <li>{user.name}</li>}</For>;
5858
}
5959
```
6060

@@ -96,6 +96,6 @@ export const route = {
9696
export default function Page() {
9797
const users = createAsync(() => getUsers());
9898

99-
return <ul>{users() && users()!.map((user) => <li>{user.name}</li>)}</ul>;
99+
return <For each={users()}>{(user) => <li>{user.name}</li>}</For>;
100100
}
101101
```

0 commit comments

Comments
 (0)