# `AshUi.Patch.Keys`
[🔗](https://github.com/hyperbob-labs/ash_ui/blob/main/lib/ash_ui/patch/keys.ex#L1)

THE entry-key function for keyed collections — one identity rule shared
by the live renderer and the binding resolver, implementing Ash resource
identity correctly:

1. an authored `key:` expression wins when declared;
2. an Ash resource keys on its FULL primary key — a composite key is the
   tuple of its values (first-field-only keying collides);
3. plain maps fall back to `:id`/`"id"`, then ordinal position.

# `entry_key`

```elixir
@spec entry_key(term(), non_neg_integer(), AshUi.Patch.Evaluator.t() | nil, term()) ::
  term()
```

Entry key for `item` at ordinal `index`, honoring `key_eval` when present.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
