JodusNodus / react-qr-reader

React component for reading QR codes from webcam.

Home Page:https://jodusnodus.github.io/react-qr-reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React 18.2.0 Support

rhufsky opened this issue · comments

Thanks for the great effort tp create and maintain react-qr-reader. Trying to use it in a new project with NextJS / React 18.2 I stumbled across a compatibility issue.
In the compatibility section of the docs there is a statement Since this library does internal use of hooks you need React >= 16.8.0.
According to package.json react-qr-reader supports React ^16.8 and Readt ^17. Is it possible to extend that to React 18?
Any help would be very much appreciated.

Hit same issue :-(
........
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from react-qr-reader@3.0.0-beta-1

npm ERR! node_modules/react-qr-reader
npm ERR! react-qr-reader@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry

I had the same problem!

Mismo problema! Alguna solucion que recomienden?
Same problem! Any solution you recommend?

Use https://www.npmjs.com/package/react-zxing instead.

Tkss @rhufsky , you saved my life.

Use npm i react-qr-reader --legacy-peer-deps