CodeSampleX

示例

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

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执