每次打开抽屉或屏幕方向发生变化时,如何阻止我的本机 expo 应用程序中的 WebView 渲染?

问题描述 投票:0回答:0

我希望我的 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;
react-native mobile webview rendering navigation-drawer
© www.soinside.com 2019 - 2024. All rights reserved.