fkhadra / fkhadra/react-contexify

Uncaught TypeError: t is undefined

Open
#255 1 comment 0 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

**What is the current behavior?**

When I right click, I get `Uncaught TypeError: t is undefined` - full stack below.

My code is:

```javascript
const MENU_ID = 'MyMenu'

const MyThing = ({....}) => {
const { show } = useContextMenu({
id: MENU_ID,
});

...

function handleItemClick({ event, props, triggerEvent, data }){
console.log(event, props, triggerEvent, data );
}

return (


...

One
Two

some stuff here


...

)
}
```

When I right click I get this in console:
```
22:08:38.790 Uncaught TypeError: t is undefined
show bundle.js:68203
show bundle.js:68216
React 14
unstable_runWithPriority scheduler.development.js:468
React 15
js index.js:7
factory react refresh:6
Webpack 3
2 bundle.js:68203:5
show bundle.js:68203
show bundle.js:68216
React 14
unstable_runWithPriority scheduler.development.js:468
React 8
forEach self-hosted:4425
React 7
js index.js:7
factory react refresh:6
Webpack 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:**

Sure, though I get a slightly different stack trace (`X is not a function`) on CodeSandbox: https://codesandbox.io/s/react-contexify-issue-255-t6fthr

**What is the expected behavior?**

It doesn't fail.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

Firefox 117 (Linux), CodeSandbox.

React 17.0.2, Contexify 6.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.