davidohayon669 / react-native-youtube

A <YouTube/> component for React Native.
MIT License
1.16k stars 472 forks source link

Video reloads on state change in Expo. #536

Closed bayramn closed 2 years ago

bayramn commented 2 years ago

I added the package to Expo Managed Flow through expo-dev-client. Everything works until I setState and refs.currents stops working and throws warning:

[Unhandled promise rejection: Error: Unable to find node on an unmounted component.] at node_modules/react-native-youtube/YouTube.ios.js:146:16 in getDuration

Seem like after reload, it loses its ref reference. Is there anyway to make this work? I desperately needed it. I also tried other library as well and it is same issue.

Edit: Works now, found issue not related to the library.