Skip to content

Commit

Permalink
docs(kida): fix 'for' example
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Jan 1, 2025
1 parent 47d0121 commit a94fa53
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/kida/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ export const $admins = computed(get => get($users).filter(user => user.isAdmin))

```tsx
// components/admins.ts
import { atIndex, record } from 'kida'
import { record } from 'kida'
import { $admins } from '../stores/admins.js'

export function Admins() {
return ul()(
for$($admins)((i) => {
const $admin = record(atIndex($admins, i))

return li()($admin.name)
})
for$($admins, user => user.id)(
$admin => li()(record($admin).name)
)
)
}
```
Expand Down

0 comments on commit a94fa53

Please sign in to comment.