WebViewRef is only supported on iOS, Android (excluding Android TV), and UWP. On UWP, WebViewRef support is currently display-only; it does not support direct user interaction.
Similar to the Facebook React Native WebView component, but refers directly to a CYIWebView After Effects object.
Remember the following when you use WebViewRef:
import { WebViewRef } from '@youi/react-native-youi';
...
<WebViewRef
name="SourceTest"
source={{uri: 'https://en.wikipedia.org/wiki/React_(JavaScript_library)'}}
onCompositionDidLoad={() => this.setState({loadingOccurred: true})}
onError={() => this.setState({ errorOccurred: true })}
onLoadStart={() => this.setState({ loadingStarted: true })}
onLoadEnd={() => this.setState({ loadingEnded: true })}
onNavigationStateChange={() => this.setState({ navigationStateChange: true })}
/>
name
After Effects layer name
Type | Required |
---|---|
String | Yes |
source
Similar to source prop of Facebook React Native WebView component.
onError
Similar to onError prop of Facebook React Native WebView component.
onLoad
Similar to onLoad prop of Facebook React Native WebView component.
onCompositionDidLoad
Invoked when the parent composition is loaded successfully and the Ref component gets attached to it.
onLoadEnd
Similar to onLoadEnd prop of Facebook React Native WebView component.
onLoadStart
Similar to onLoadStart prop of Facebook React Native WebView component.
onNavigationStateChange
Similar to onNavigationStateChange prop of Facebook React Native WebView component.
startInLoadingState
Similar to startInLoadingState prop of Facebook React Native WebView component.
decelerationRate
Similar to decelerationRate prop of Facebook React Native WebView component
bounces
Similar to bounces prop of Facebook React Native WebView component.
scrollEnabled
Similar to scrollEnabled prop of Facebook React Native WebView component.
visible
Determines whether the component should be visible or not.
Default is true
.
Note the following:
Type | Required |
---|---|
bool | No |
testID
A unique identifier for this element to be used in UI automation testing scripts.
Type | Required |
---|---|
string | No |