v0.20.233 - 8.2 / 5.8

useSelector

Builds a signal generator from a source signal. The returned function, called with a value, yields a read-only signal that's true when the source currently matches that value. The key property: this uses a single effect for every value — not one effect per value — so it scales to long lists of items checking against a single selection.

# Using selector

Automatically create signals for the values and returns true when a value matches

# Using selector with multiple values

Using it with multiple values