Skip to content

Fix stale state in RNTester's Touchable and Pressable event log examples - #60433

Merged
robhogan merged 1 commit into
mainfrom
robhogan/visual-touchable-feedback-events
Dec 1, 2026
Merged

robhogan merged 1 commit into
mainfrom
robhogan/visual-touchable-feedback-events

Conversation

@robhogan

@robhogan robhogan commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

The event log examples built each entry from stale state, so events handled in the same React batch overwrote each other. This made the touchable/feedback-events/pressed screenshot flaky, and it falsely failed #60396. They now use a functional state updater, as PressableFeedbackEvents already does.

The screenshot changes from press / pressIn to press / pressOut / pressIn on iOS and Android, so this needs visual-change-approved.

Changelog: [Internal]

Test plan:
Ran touchable.yml 3/3 on an iPhone 17 Pro simulator, against the main Release app with this branch's JS bundle swapped in. Every capture showed all three events.

The event log examples built each entry from stale state, so events handled in the same React batch overwrote each other. This made the `touchable/feedback-events/pressed` screenshot flaky. They now use a functional state updater, as `PressableFeedbackEvents` already does.

The screenshot changes from `press`, `pressIn` to `press`, `pressOut`, `pressIn` on iOS and Android.

Changelog: [Internal]
@robhogan
robhogan requested a review from cortinico December 1, 2026 14:21
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 1, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Dec 1, 2026
@robhogan
robhogan merged commit 534970b into main Dec 1, 2026
66 of 71 checks passed
@robhogan
robhogan deleted the robhogan/visual-touchable-feedback-events branch December 1, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants