I want a WebView component to display both when online and offline. When online, I want it to use the url I have provided. I want the locally saved/Cached so it can also be displayed when offline. Here's a code example:
`import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; import WebView from 'react-native-webview'; function App() { return ( <WebView style={styles.container} source={{ uri: 'https://wikipedia.org' }} //a random example /> ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center' }, }) export default App;`
I tried using different dependencies but failed. I'm pretty new to react-native, please don't make it too complex when answering.