Replies: 1 comment
-
I see this is marked as resolved, but I'll add an answer in case anyone else comes across it in search:
function Button(props) {
const ref = useRef(null);
const { buttonProps } = useButton(props, ref);
return <button {...buttonProps} ref={ref}>{props.children}</button>;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using react-aria's date picker and button functionalities in a react project. I am using a very recent version of react (v18). When I try to create a button component which uses the
useButton
hook, I have warning from react saying thatonPress
is not a native HTML attribute, and it is ignored.How can I go around this without disabling the whole warning?
Beta Was this translation helpful? Give feedback.
All reactions