Monorepo: <Menu.Button /> is missing a parent <Menu /> component when Menu and MenuButton come from different modules/packages #3434
Unanswered
florianbepunkt
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a monorepo with a shared collection of ui elements, one of them being a context menu, which uses the Menu component from headlessui. It allows for a customized MenuButton to be passed to the component. When I do this from my consuming package, I get the error
<Menu.Button /> is missing a parent <Menu /> component
. However when the CtxMenu component lives in the same package where it is consumed, the error is not present.Not sure whether this a bug or misconfig on my side.
This is in my shared ui package
Then it is consumed like this in my main package
Beta Was this translation helpful? Give feedback.
All reactions