Code example that introduces TypeError. #12210
Labels
component: menu
This is the name of the generic UI component, not the React module!
good first issue
Great for first contributions. Enable to learn the contribution process.
typescript
The problem is here:
I have a TypeScript project, where I decided to use Menu Component. After copy-pasting the code from the documentation, I got this TypeError for Menu Component:
Which means that the value of
anchorEl
can not benull
, whereas the documentation implies that it could. Setting the value ofanchorEl
toundefined
solves the problem.Your Environment
The text was updated successfully, but these errors were encountered: