V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
lxerxa
V2EX  ›  程序员

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

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