SolidJSS
SolidJSโ€ข3y agoโ€ข
10 replies
AesthetiCoder

How is the type of the onclick event ?

Hello I have a question about the on-click method of the button, the event doesn't have a type, the type is something like this, is that the real type? it should be one type only for the event

  const handleClick = (event: MouseEvent & {
    target: Element;
    currentTarget: HTMLButtonElement;
  }) =>
  {
    handleRipple(event);

    if(onclick)
    {
      onclick();
    }
  };

  return (
    <button
      onclick={handleClick}
    >
      {children}
    </button>
  );
Was this page helpful?