• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lxerxa
V2EX  ›  程序员

Taro-React switchTab 或 redirectTo 到新的 tab 页面没有 render 问题

  •  
  •   lxerxa · Aug 27, 2020 · 1068 views
    This topic created in 2106 days ago, the information mentioned may be changed or developed.

    tab 页面里是这样写的:

      componentDidMount () {
        this.index();
      }
      
      render () {
        const { issue: { collection } } = this.props;
    
        return (
          <View className='index'>
            <List collection={ collection }/>
          </View>
        )
      }
    

    index 请求接口了也正常返回数据了,没有 render, 但是刷新页面反而 render 了。第一次进入 Tab 页,nextState 变了没有 render,不知道啥原因?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   943 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 19:44 · PVG 03:44 · LAX 12:44 · JFK 15:44
    ♥ Do have faith in what you're doing.