Skip to content

Commit

Permalink
fix: typo in type name (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
syhner authored May 25, 2024
1 parent dc6b5bd commit 3897748
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Page() {
return (await response.json()) as User[];
});

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

Expand Down Expand Up @@ -54,7 +54,7 @@ export const route = {
export default function Page() {
const users = createAsync(() => getUsers());

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

Expand Down Expand Up @@ -96,6 +96,6 @@ export const route = {
export default function Page() {
const users = createAsync(() => getUsers());

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

0 comments on commit 3897748

Please sign in to comment.