Skip to content

useMenuItem onAction & onClose deprecation confusion #3946

Answered by reidbarber
binaryartifex asked this question in Q&A
Discussion options

You must be logged in to vote

The example is basically the same, there's just no need to pass down onClose and onAction to useMenuItem since they're handled by useMenu: https://codesandbox.io/s/menu-with-react-aria-tailwind-css-e57rq2?file=/src/App.tsx

The examples in the docs also do this: https://react-spectrum.adobe.com/react-aria/useMenu.html#dynamic-collections

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@binaryartifex
Comment options

Answer selected by binaryartifex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants