Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to react 18 #3

Open
AlexNguetcha opened this issue Mar 25, 2023 · 3 comments
Open

Upgrade to react 18 #3

AlexNguetcha opened this issue Mar 25, 2023 · 3 comments

Comments

@AlexNguetcha
Copy link
Contributor

@patrissoljuns/react-click-outside do not support react@18.x.y

@PatrissolJuns
Copy link
Owner

Have you tried it in a brand new project?

@AlexNguetcha
Copy link
Contributor Author

Have you tried it in a brand new project?

No, i tried it in a current project
Here is a part of package.json

{
    "dependencies": {
      "@patrissoljuns/react-click-outside": "^1.0.0",
      "react": "^18.2.0",
      "react-dom": "^18.2.0"
    }
  }

When i try to install npm i @patrissoljuns/react-click-outside

i get this error

npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project   
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0" from @patrissoljuns/react-click-outside@1.0.0
npm ERR! node_modules/@patrissoljuns/react-click-outside
npm ERR!   @patrissoljuns/react-click-outside@"^1.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@PatrissolJuns
Copy link
Owner

PatrissolJuns commented Mar 30, 2023

I've just tried it with a fresh new react project and it works fine. Here's my package.json dependencies

"dependencies": {
    "@emotion/react": "^11.10.6",
    "@emotion/styled": "^11.10.6",
    "@mui/icons-material": "^5.11.11",
    "@mui/lab": "^5.0.0-alpha.124",
    "@mui/material": "^5.11.15",
    "@patrissoljuns/react-click-outside": "^1.0.0",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "@types/jest": "^27.5.2",
    "@types/node": "^16.18.22",
    "@types/react": "^18.0.31",
    "@types/react-dom": "^18.0.11",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-scripts": "5.0.1",
    "typescript": "^4.9.5",
    "web-vitals": "^2.1.4"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants