react-native-view-shot
react-native-view-shot copied to clipboard
`No view found with reactTag: 772`
After upgrading to the new arch the captureRef method is failing with [Error: No view found with reactTag: 772]. I tried the patch from #555 and that didn't work for me.
Specs:
- react-native: 0.77
- expo: 52.0.36
- react-native-view-show: 4.0.3
- newArch: enabled
This might be connected - https://github.com/facebook/react-native/issues/50800#issuecomment-2815120399
I've also had this error on iOS and new architecture while trying to call captureRef on a regular <View> component.
The solution for me was to switch to <ViewShot> component:
const capture = () => {
const image = captureRef(viewShotRef);
}
- return <View ref={viewRef}>...</View>
+ return <ViewShot ref={viewShotRef}>...</ViewShot>