File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,14 @@ export const $admins = computed(get => get($users).filter(user => user.isAdmin))
5353
5454``` tsx
5555// components/admins.ts
56- import { atIndex , record } from ' kida'
56+ import { record } from ' kida'
5757import { $admins } from ' ../stores/admins.js'
5858
5959export function Admins() {
6060 return ul ()(
61- for$ ($admins )((i ) => {
62- const $admin = record (atIndex ($admins , i ))
63-
64- return li ()($admin .name )
65- })
61+ for$ ($admins , user => user .id )(
62+ $admin => li ()(record ($admin ).name )
63+ )
6664 )
6765}
6866```
@@ -110,7 +108,7 @@ $count.set($count.get() + 1)
110108update ($count , count => count + 1 )
111109```
112110
113- To listen to changes, use the ` listen ` or ` subscribe ` function. ` subscribe ` will call the listener immediately.
111+ To listen changes, use the ` listen ` or ` subscribe ` function. ` subscribe ` will call the listener immediately.
114112
115113``` ts
116114import { signal , subscribe } from ' kida'
You can’t perform that action at this time.
0 commit comments