Open bhufmann opened 1 year ago
Confirmed I am hitting the same issue described above with 6.0.0 following the example in the "gist". Dropped the version of react-contexify to 5.0.1-1 and seems to be working now without any code changes.
If it helps here are the packages I'm using in case there is some weird interaction (list generated after dropping to rev 5.0.1-1).
āāā @apollo/client@3.7.8 āāā @babel/core@7.20.12 āāā @babel/plugin-transform-classes@7.20.7 āāā @babel/preset-env@7.20.2 āāā @babel/preset-react@7.18.6 āāā @projectstorm/react-diagrams@7.0.1 āāā @types/react-dom@18.0.11 āāā @types/styled-components@5.1.26 āāā @typescript-eslint/eslint-plugin@5.52.0 āāā @typescript-eslint/parser@5.52.0 āāā babel-loader@9.1.2 āāā bootstrap@5.2.3 āāā css-loader@6.7.3 āāā eslint-config-standard-with-typescript@34.0.0 āāā eslint-plugin-import@2.27.5 āāā eslint-plugin-n@15.6.1 āāā eslint-plugin-promise@6.1.1 āāā eslint-plugin-react@7.32.2 āāā eslint@8.34.0 āāā graphql@16.6.0 āāā react-bootstrap@2.7.2 āāā react-contexify@5.0.1-1 āāā react-dom@18.2.0 āāā react-tooltip@5.8.1 āāā react@18.2.0 āāā style-loader@3.3.1 āāā styled-components@5.3.6 āāā ts-loader@9.4.2 āāā typescript@4.9.5 āāā webpack-cli@5.0.1 āāā webpack@5.75.0
I'm facing same issue with react-contexify v6.0.0. Appears to be some issue with clsx dependency.
Forcing react-contexify to use clsx 2.0.0 through overrides solved the issue for me.
@fkhadra since upgrading to 2.0.0 should be fine according to the release notes, is this something that you'd be willing to accept?
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:
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.