我希望我的 WebViews 保持原样而不重新渲染,除非满足特定条件,即我再次导航到此页面。否则他们不应该重新渲染。
const SCREEN_HEIGHT = Dimensions.get('window').height;
class GraphComponent extends Component {
render() {
console.log('rendering WebView...');
return (
<WebView
source={{ uri: URI' }}
style={{ flex: 1 , backgroundColor: '1b1b1f',
bottom: 0,
width: '100%',
height: SCREEN_HEIGHT*0.6}}
/>
);
}
}
export default GraphComponent;