retyui/react-quick-pinch-zoom

Does not work with TS.

CyanFroste opened this issue · 3 comments

(alias) class QuickPinchZoom
import QuickPinchZoom
JSX element class does not support attributes because it does not have a 'props' property.ts(2607)
'QuickPinchZoom' cannot be used as a JSX component.
  Its instance type 'PinchZoom' is not a valid JSX element.
    Type 'PinchZoom' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.ts(2786)

Also, unable to attach ref to the img tag within.

broken again in 4.5.0 :( but 4.0.2 works as advertised 👍

@tknaller no it's work fine!

I've just create a blank ts project:

npx create-react-app test-pzoom --template typescript
cd test-pzoom/
yarn add react-quick-pinch-zoom
# update App.tsx
yarn tsc --noEmit # no errors