How to I type the onChange function for the Select #5363
-
This is really confusing and the page about typescript doesn't make anything clear. I'm trying to get the value of the select through a useState, but passing the set function throws a type error. In the website it doesn't tell us how to properly type the function, which it take those "Option", "actionMeta" out of nowhere inside a function declaration but no useState or anything similar. Can anyone tell me how am I suppose to type onChange function in an easy / well explained way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Here's a simple example. Let me know if you're wanting to type a more complex or different case. |
Beta Was this translation helpful? Give feedback.
Here's a simple example. Let me know if you're wanting to type a more complex or different case.