V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lxerxa
V2EX  ›  程序员

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

  •  
  •   lxerxa · 2020-08-27 22:57:43 +08:00 · 672 次点击
    这是一个创建于 1341 天前的主题,其中的信息可能已经有所发展或是发生改变。

    tab 页面里是这样写的:

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

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

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5266 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 05:56 · PVG 13:56 · LAX 22:56 · JFK 01:56
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.