This is not GitHub.com

Like what you see? Install OctoLinker now!

Skip to content
#

promises

Here are 1,076 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
enhancement good first issue

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