Should hook useToggle ignore React events? #696
-
Hi all, function MyComponent() {
const [state, toggleState] = useToggle(false);
return <button onClick={toggleState}>Toggle me!<button>
} I'm wondering if we can ignore the first argument if it is an event (or a click event in this case). |
Beta Was this translation helpful? Give feedback.
Answered by
AndreasNel
Nov 16, 2022
Replies: 1 comment
-
Hi there! This functionality was introduced in #867 and released in version 15.0.0. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
xobotyi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there!
This functionality was introduced in #867 and released in version 15.0.0.