react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

Ref capture() incorrect typescript

Open xitrumIT opened this issue 3 years ago • 7 comments
trafficstars

I use viewshot for my application and the typescript code is not able to identify the type of the ref. and how do fix it, i dont want to set ref: any

Version & Platform

"react-native": "0.68.2", "react-native-view-shot": "^3.3.0" "typescript": "^4.5.2", // HomePage passing ref Screen Shot 2022-08-18 at 00 14 22

// TopBar get ref Screen Shot 2022-08-18 at 00 14 36

xitrumIT avatar Aug 17 '22 17:08 xitrumIT

Thanks for the github issue. This should be fixed in 3.4.0 🤞

gre avatar Aug 20 '22 19:08 gre

Thanks for the github issue. This should be fixed in 3.4.0 🤞

I don't see this in the 3.4.0 log. What is the correct typing for ref?

avedetvedea avatar Nov 10 '22 17:11 avedetvedea

oops, I probably misread the issue reported here. ( probably different as what was fixed in https://github.com/gre/react-native-view-shot/pull/419 )

gre avatar Nov 10 '22 20:11 gre

oops, I probably misread the issue reported here. ( probably different as what was fixed in #419 )

All good. What do you recommend for ref typing going forward?

avedetvedea avatar Nov 10 '22 20:11 avedetvedea

@gre ?

avedetvedea avatar Nov 13 '22 11:11 avedetvedea

sorry i can't look at it right now, but anyone is free to help on this matter. To the next weekend hopefully 🙏

gre avatar Nov 14 '22 14:11 gre

I think the issue is resolved now

import ViewShot from 'react-native-view-shot';

Screenshot 2023-12-07 at 12 22 52

"react-native": "0.71.14", "react-native-view-shot": "3.5.0", "typescript": "^4.9.4"

andreyukD avatar Dec 07 '23 11:12 andreyukD