Skip to content

Conversation

@j-piasecki
Copy link
Member

Description

Hides internal fields (state, oldState, and handlerTag) from the Gesture Handler events exposed externally. Those shouldn't be needed when using the v3 api and clutter the events.

This also means that update events don't differ from the update events in shape, so they became redundant.

Test plan

Verify that state, oldState, and handlerTag are hidden from events.

Comment on lines +98 to +103
std::dynamic_pointer_cast<const RNGestureHandlerDetectorEventEmitter>(_eventEmitter)
->onGestureHandlerAnimatedEvent({
.state = event.state,
.handlerTag = event.handlerTag,
.handlerData = event.handlerData,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is only formatting, right? Do we want that in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even notice that. It must have been added by lint-staged.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind it, so I'll leave it up to you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer not to have it here as it will affect blame. But if you leave it it will also be fine.

@j-piasecki j-piasecki merged commit b27c7c4 into next Dec 1, 2025
5 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/hide-internal-fields branch December 1, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants