react-native-view-shot
react-native-view-shot copied to clipboard
Ref capture() incorrect typescript
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

// TopBar get ref

Thanks for the github issue. This should be fixed in 3.4.0 🤞
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?
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 )
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?
@gre ?
sorry i can't look at it right now, but anyone is free to help on this matter. To the next weekend hopefully 🙏
I think the issue is resolved now
import ViewShot from 'react-native-view-shot';
"react-native": "0.71.14", "react-native-view-shot": "3.5.0", "typescript": "^4.9.4"