サンプル
Show that two sequential setState calls with stale state are not both applied in concurrent mode
sha256:88f977ae74e5952e7ce178249ad2d13425490fd3043c1e33c2477d4095798122
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Show that two sequential setState calls with stale state are not both applied in concurrent mode HOW
- パッケージ
- jsdom 26.1.0 react 18.2.0 react-dom 18.2.0
- 環境
- node
- 作成日
- 2026-08-17T03:19:12Z
よくある思い込み
Two setState calls using the current state value will both increment the counter, resulting in a final state of 2
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- assert two sequential setCount(count + 1) calls in one React 18 concurrent-root update produce a final rendered state of 1
ファイル
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9