Skip to content

Conversation

@j-piasecki
Copy link
Member

Description

Due to how codegen is structured, we rely on a dynamic handlerData field in events so we don't have to define an event handler for each event type we may be sending. Currently, this is reflected in the API - when reading data from events, it needs to be read from handlerData.

This PR adds flattened types and a flatten step to get rid of that step, so that data can be read directly from the event.

This doesn't impact animated, so the event mapping there needs to include both nativeEvent and handlerData.

Test plan

console.log the events

Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

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

Those are some loooooong type names 😅

@j-piasecki j-piasecki merged commit 7feb18d into next Nov 27, 2025
2 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/unwrap-events branch November 27, 2025 08:36
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