DEV Community

Discussion on: Why the React community is missing the point about Web Components

Collapse
 
calebwilliams12 profile image
Caleb Williams

Can't believe I'm just now seeing this, but it is what it is. In case any one else stumbles on this conversation, what I'm talking about is native custom event binding. In React, you pass down handlers through props: <my-el onClick={whatever}></my-el>, but that requires React's synthetic event system to know what your event name is (which it can't the way it's currently architected).

In Angular and Vue you can bind using the (event-name)="callback" or v-on:event-name="callback" syntax. LitHTML or LitElement use the @event-name="${callback}" syntax. There's currently no way to declaratively process non-native events using React/JSX and that's what I need.