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.
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.