Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes regression where functions could not be passed inline to component event handlers #94

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

joshwilsonvu
Copy link
Collaborator

Code like <Comp onClick={() => props.onClick}> was failing, because of the extra specificity that anonymous functions receive when matching against tracked scopes. This PR simply removes the special treatment and uses the normal tracked scope matching function, which allows tracked scopes marked as expressions.

Component event handlers are now marked as expressions, like other props, because they do rebind. They were previously mistakenly marked as accepting functions only, like native element event handlers.

@joshwilsonvu joshwilsonvu self-assigned this Apr 13, 2023
@joshwilsonvu joshwilsonvu merged commit e6c85cb into main Apr 13, 2023
3 checks passed
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.

None yet

1 participant