gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.64k stars 343 forks source link

It doesn't work on the new architecture of react native #452

Closed cervisebas closed 5 months ago

cervisebas commented 1 year ago

bug report

Version & Platform

Platform: Android

Expected behavior

I was expecting a capture of the components to be performed.

Actual behavior

Las funciones de captura no devuelven ningun tipo de resultado, no muestran errores y no accionan nada. El componente "ViewShoot" funciona pero solo se comporta como un componente "View" normal.

Steps to reproduce the behavior

import React, { PureComponent } from "react"; import { Text } from "react-native"; import ViewShot from "react-native-view-shot";

export default class Example extends PureComponent { constructor(props) { super(props); } private refViewShot = createRef();; componentDidMount() { this.refViewShot.current.capture() .then((uri)=>console.log(uri)) .catch((err)=>console.log(err)); } render() { return(

Hello friends!!!
    </ViewShot>);
}

}

andy7076 commented 1 year ago

+1

faceyspacey commented 1 year ago

+1

Nensi9 commented 1 year ago

Yes, it's not working with new version

sohayb commented 9 months ago

Same issue as #469

RP-alissonpaschoal commented 9 months ago

+1 :smiling_face_with_tear:

rohit-jindal018 commented 9 months ago

capture not working in Android new architecture.

cortinico commented 5 months ago

Here the fix for this library:

Please note that this would work only from 0.74.0-rc5 onwards (which is going to be published on Monday)