fkhadra / fkhadra/react-contexify

"Uncaught TypeError: X is not a function" in Menu.tsx

Open
#241 5 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.2k
Forks
132
PR merge metrics
No merged PRs in 30d

Description

**Do you want to request a *feature* or report a *bug*?**
Bug. Not sure if it's a bug. It might be in my environment. I'm looking for help to resolve issue.

**What is the current behavior?**
I implementing a context menu using react-contexify v6.0.0 and I get the following exception and my component is not rendered:
```
react-dom.development.js:26923 Uncaught TypeError: X is not a function
at S (Menu.tsx:3:3)
at it (Menu.tsx:3:3)
at renderWithHooks (react-dom.development.js:16305:1)
at mountIndeterminateComponent (react-dom.development.js:20074:1)
at beginWork (react-dom.development.js:21587:1)
at beginWork$1 (react-dom.development.js:27426:1)
at performUnitOfWork (react-dom.development.js:26560:1)
at workLoopSync (react-dom.development.js:26466:1)
at renderRootSync (react-dom.development.js:26434:1)
at recoverFromConcurrentError (react-dom.development.js:25850:1)
```

The Chrome dev tools show the error on the following line of Menu.tsx:3:3

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:**
I don't have simple example to reproduce. I'm in development of a full-stack application with a lot changes to use the context menu.

**What is the expected behavior?**
No exception and component is rendered

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
I'm using react v18.2.0. I'm running Linux (Ubuntu 18.04). It happens with recent Chrome browser.
I tried using react-contexify v5.0.0 and I don't see that error. However, I see flashing menu when it's being closed which is supposed to be fixed in v6.0.0.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.