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

Need to update for react 18^ #881

Open
limonsafayet opened this issue Oct 8, 2024 · 4 comments
Open

Need to update for react 18^ #881

limonsafayet opened this issue Oct 8, 2024 · 4 comments

Comments

@limonsafayet
Copy link

The error you're encountering is due to a version mismatch between react and react-sortable-hoc in your project. The version of react-sortable-hoc requires react version ^16.3.0 || ^17.0.0, but your project is using [email protected], which causes a conflict.

@muneeb71999
Copy link

Hi, @limonsafayet

I have created this repo and add instructions on how to set it up for your project. You can follow these and let me know if they work. I tried it with my project and it was working.

I am using it with Vite not sure about other bundling tools because I haven't tested it with other.

https://github.com/muneeb71999/react-sortable-hoc-v18

Thanks.

@mltsy
Copy link

mltsy commented Jan 24, 2025

For me it worked to just override the peer dependency in my own package.json file:

  "dependencies": {
    "react-sortable-hoc": "^2.0.0"
  },
  "overrides": {
    "react-sortable-hoc": {
      "react": "^18.0",
      "react-dom": "^18.0"
    }
  },

@Badestrand
Copy link

If it works with react 18 anyway, can we have an adjustment of the package.json here?

@mltsy
Copy link

mltsy commented Mar 6, 2025

That probably won't happen as this package's maintainers have dropped it, in favor of dnd-kit. It's also not clear that it's 100% compatible with React 18, though several people have used them together, apparently without issue, AFAICT. I would recommend using the workaround above unless/until you're ready to switch to dnd-kit.

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

4 participants