zpao / qrcode.react

A <QRCode/> component for use with React.

Home Page:https://zpao.github.io/qrcode.react/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS: `QRCodeCanvas` and `QRCodeSVG` are not typed as React components

ipanasenko opened this issue · comments

Generated types for QRCodeCanvas and QRCodeSVG are just functions.
image

While it works as expected in most cases, it's not possible to pass implicit React props, e.g. ref:
image

They should have proper React.FunctionComponent type to allow this

These are currently typed fine - ref was not supported. #202 added proper support for refs and will ship in the next major version.