<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabletopKit",
  "identifier" : "/documentation/TabletopKit/TabletopGame/Observer/actionIsPending(_:oldSnapshot:newSnapshot:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TabletopKit"
    ],
    "preciseIdentifier" : "s:11TabletopKit0A4GameC8ObserverP15actionIsPending_11oldSnapshot03newI0yqd___AA05TableI0VAJtAA0A6ActionRd__lF"
  },
  "title" : "actionIsPending(_:oldSnapshot:newSnapshot:)"
}
-->

# actionIsPending(_:oldSnapshot:newSnapshot:)

Called once for every action in the update in which it is provisionally
accepted to begin contributing to the speculative visible table state,
regardless of whether that action passes provisional validation.
Local actions become pending in the update after they are added.
Remote player actions become pending in the update in which the network
request is received.
The ordering of pending actions is ordered within each player, but
each player in a network session may observe a different relative
ordering of pending actions originating from different players.
Most actions which pass initial validation create a difference in the
state between `oldSnapshot` and `newSnapshot` that can be detected if needed.
If the action did not pass validation on initial add to pending, the
table state in `oldSnapshot` and `newSnapshot` will be identical.
In a network session, the validity of an action may change one or more
times between becoming pending and being confirmed or rolled back as
the order of earlier actions is settled, if there are conflicts between
actions. However, in practice, conflicting actions from different players
should not be common.

```
func actionIsPending(_ action: some TabletopAction, oldSnapshot: TableSnapshot, newSnapshot: TableSnapshot)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)