Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return useList(userList, userName => {
const isSelected = useStoreMap({
store: user,
keys: [userName],
fn: (selected, [current]) => selected === current,
})
return (
<>
<br>
<button> selectUser(userName)} disabled={isSelected}>
{userName}
</button>
)
})
}
return useList(userList, userName => {
const isSelected = useStoreMap({
store: user,
keys: [userName],
fn: (selected, [current]) => selected === current,
})
return (
<>
<br>
<button> selectUser(users[userName])}
disabled={isSelected}>
{userName}
</button>
)
})
}