Skip to content
#

promises

Here are 1,060 public repositories matching this topic...

brainkim
brainkim commented Jan 5, 2021

We should be able to use dispatchEvent to define callback prop based onevent APIs, so we don’t have to deal with capturing/bubbling for specific events.

function MyComponent({id}) {
  const onclick = () => {
    this.dispatchEvent(new CustomEvent("customclick", {detail: {id}}));
  };
  
  return (
    /* children */
  );
}

// Usage

<MyComponent oncustomclick={(e

Improve this page

Add a description, image, and links to the promises topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the promises topic, visit your repo's landing page and select "manage topics."

Learn more