Skip to content

Commit 8110eda

Browse files
committed
update
1 parent a40025d commit 8110eda

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/routes/reference/secondary-primitives/create-selector.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,15 @@ Debug name used by development tooling.
6262

6363
- **Type:** `(key: U) => boolean`
6464

65-
Returns an accessor function that reports whether the provided key matches the current source value.
65+
Returns an accessor function that reports whether the provided key matches the current source value. Each subscriber tracks only its own key.
6666

6767
## Behavior
6868

69-
- The returned function compares each key against the current source value.
70-
- With the default comparison, matching uses strict equality.
71-
- Subscribers update when their key starts or stops matching the source value.
69+
- The returned function compares each key against the current source value. With the default comparison, matching uses strict equality.
70+
- Solid tracks subscribers by key, so only subscribers whose key starts or stops matching need to update.
71+
- On the server, `createSelector` compares each key directly against `source()` without keyed subscriber bookkeeping.
72+
73+
Compared with checking equality directly in every subscriber, `createSelector` keeps subscriptions keyed by the compared value.
7274

7375
## Examples
7476

0 commit comments

Comments
 (0)