Ever since upgrading my Snack to SDK 33, it now only works on Android. The iOS app seems to load but shows nothing. I can confirm that this is not a problem with the external library I am using. Here’s the Snack:
Here’s the code:
/*Example of Recat Native Loading Spinner Overlay*/
import * as React from 'react';
import { Text, View, StyleSheet, Button, WebView } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
export default class App extends React.Component {
state = {
//default loading false
loading: false,
};
showSpinner() {
console.log('Show Spinner');
this.setState({ loading: true });
}
hideSpinner() {
console.log('Hide Spinner');
this.setState({ loading: false });
}
render() {
return (
<View style={styles.container}>
<Spinner
//visibility of Overlay Loading Spinner
visible={this.state.loading}
//Text with the Spinner
textContent={'Loading...'}
//Text style of the Spinner Text
textStyle={styles.spinnerTextStyle}
/>
<WebView
style={styles.WebViewStyle}
//Loading URL
source={{ uri: 'https://google.com' }}
//Enable Javascript support
javaScriptEnabled={true}
//For the Cache
domStorageEnabled={true}
//View to show while loading the webpage
//Want to show the view or not
//startInLoadingState={true}
onLoadStart={() => this.showSpinner()}
onLoadEnd={() => this.hideSpinner()}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
textAlign: 'center',
paddingTop: 20,
},
spinnerTextStyle: {
color: '#FFF',
},
});
All help would be appreciated