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

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

  •  
  •   lxerxa · Aug 27, 2020 · 1086 views
    This topic created in 2113 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   ·   4170 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 00:08 · PVG 08:08 · LAX 17:08 · JFK 20:08
    ♥ Do have faith in what you're doing.