0

I am trying to create a React component that has a property onClick and I am trying to determine the right type signature for the props of the component.

I have tried the following along with various modifications.

type Props = {
  label: string,
  onClick: ?func: (e: SyntheticMouseEvent<HTMLButtonElement>) => 
}

What is the proper type to accept for the onClick prop?

BBS
  • 1,351
  • 2
  • 12
  • 27

1 Answers1

0

I'd add a typescript tag to this, but events are generally voids since they don't have a return void

Schalton
  • 2,867
  • 2
  • 32
  • 44