masroorejaz / react-simple-captcha

A very simple and powerful captcha for ReactJS
41 stars 19 forks source link

Update to react 18. #17

Closed gabrielmicko closed 2 years ago

gabrielmicko commented 2 years ago

Actually wouldn't it be better to make react a peer dependency?

gabrielmicko commented 2 years ago

@masroorejaz I am trying to create PR, but seems like repo is not up-to-date. In src/hooks/package.json I see version number: 8.2.0 and npm's version is already 8.2.6.

I suggest you to change, package.json this way:

"dependencies": {
    "react-html-parser": "^2.0.2"
  },
  "devDependencies": {
    "react": "^18.1.0",
    "react-dom": "^18.1.0"
  },
  "peerDependencies": {
    "react": "*"
  }

I'd like to update my react version to 18, but this is blocking me from doing so, I don't want to have multiple react versions.

masroorejaz commented 2 years ago

@gabrielmicko Thank you for your suggestion. I have made the changes you suggested. Kindly check now.

I kept the version to React 17 otherwise it will no longer support backward compatibility. But it will work with React 18 as well.

Best Regards, Masroor Ejaz.

gabrielmicko commented 2 years ago

Thanks @masroorejaz, I think it will be fine.