Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

We pass null sometimes when the event target has disappeared. E.g. when touches fires on a deleted node.

We pass null sometimes when the event target has disappeared. E.g. when
touches fires on a deleted node.

export function dispatchEvent(
target: Object,
target: null | Object,
Copy link
Contributor

Choose a reason for hiding this comment

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

In what cases is target not a Fiber? Like could this type be null | Fiber?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's never not a Fiber, hence the case below, but the caller cannot guarantee it right now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ultimately it is because the "internalInstanceHandle" is supposed to be an opaque object as far as the host configs are concerned. So it should really be using opaque types instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool. This makes sense.

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

Same question as Nate

@sebmarkbage sebmarkbage merged commit 64e1921 into facebook:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants