testfairy / react-native-testfairy

React Native component for TestFairy SDK
https://www.testfairy.com
Apache License 2.0
33 stars 12 forks source link

TestFairy.hideView() not working #33

Closed vinodf2f closed 3 years ago

vinodf2f commented 4 years ago

We have integrated testfairy in our application and we are getting an issue with hideview. The implementation is quite simple nothing complex. Please find the code below. Also attaching screenshot of the error message we are getting.

Also docs seems to be using deprecated method of assigning refs.

We are using - "react": "16.13.1", "react-native": "0.62.2", "react-native-testfairy": "^2.32.1",

Platform IOS

Screenshot 2020-09-25 at 2 54 20 PM

Platform Android

Screenshot 2020-09-25 at 2 47 36 PM

export default class Onboarding extends Component { componentDidMount() { TestFairy.hideView(this.rerref); } render() { return ( <View style={{flex: 1, backgroundColor: 'white'}} ref={(ref) => (this.rerref = ref)}> <View style={{flex: 1, backgroundColor: 'red'}} /> ); } }

@vijaysharm

vijaysharm commented 4 years ago

Hi. Thanks for letting us know. I'll have a look and get back to you.

vijaysharm commented 4 years ago

Hi @vinodf2f, can you try using nativeID instead to see if that works for you? Although I didn't get the same error, I noticed that nativeID seemed to work for me. If so I'll update the docs so they recommend using nativeID instead.

vinodf2f commented 3 years ago

Hey @vijaysharm , It worked for us . Thank you .