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

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

Open cervisebas opened this issue 2 years ago • 6 comments

bug report

Version & Platform

  • react-native: 0.70.6
  • react-native-view-shot: ^3.5.0

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<ViewShot>();; componentDidMount() { this.refViewShot.current.capture() .then((uri)=>console.log(uri)) .catch((err)=>console.log(err)); } render() { return(<ViewShot ref={this.refViewShot}> <Text>Hello friends!!!</Text> </ViewShot>); } }

cervisebas avatar Jan 10 '23 22:01 cervisebas

+1

andy7076 avatar Apr 03 '23 01:04 andy7076

+1

faceyspacey avatar Apr 21 '23 07:04 faceyspacey

Yes, it's not working with new version

Nensi9 avatar Jun 29 '23 12:06 Nensi9

Same issue as #469

sohayb avatar Nov 24 '23 15:11 sohayb

+1 :smiling_face_with_tear:

RP-alissonpaschoal avatar Dec 01 '23 15:12 RP-alissonpaschoal

capture not working in Android new architecture.

rohit-jindal018 avatar Dec 11 '23 06:12 rohit-jindal018

Here the fix for this library:

  • https://github.com/gre/react-native-view-shot/pull/516

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

cortinico avatar Mar 21 '24 14:03 cortinico