CodeSampleX

Exemple

Show that two sequential setState calls with stale state are not both applied in concurrent mode

sha256:88f977ae74e5952e7ce178249ad2d13425490fd3043c1e33c2477d4095798122

PUBLISHED L3_CONTRACT_PASS MIT-0

Cas

Objectif
Show that two sequential setState calls with stale state are not both applied in concurrent mode HOW
Paquets
jsdom 26.1.0 react 18.2.0 react-dom 18.2.0
Environnement
node
Créé
2026-08-17T03:19:12Z

Ce que l'on suppose souvent

Two setState calls using the current state value will both increment the counter, resulting in a final state of 2

L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.

Contrat

Fichiers

Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté

Seeder d'origine

csx-seed

Reçus de vérification