What's the TypeScript type of the handler used in an array event binding? #1376
-
https://www.solidjs.com/tutorial/bindings_events describes a way to pass an argument to an event handler: const handler = (data, event) => /*...*/
<button onClick={[handler, data]}>Click Me</button> solid/packages/solid/h/jsx-runtime/src/jsx.d.ts Lines 43 to 52 in c993eb0 |
Beta Was this translation helpful? Give feedback.
Answered by
genericGenie
Jul 16, 2024
Replies: 1 comment
-
@jyasskin,
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jyasskin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jyasskin,
I just bumped into this issue as well. For the type, I specified the array parameter position to use [0] because it has 2 parameters.
I need the event and some optional custom data structure I pass into it. Below is a simplified example.