Scott老师,我是按照视频上的ES5来写的,用这个组件的时候,出现警告:Component's children should not be mutated.

来源:5-2 TabBarIOS 开启 App 首页(1)

Chrome_

2016-10-26

ExceptionsManager.js:82 Warning: Component's children should not be mutated.

    in RCTText (created by Text)

    in Text (created by imoocApp)

    in RCTView (created by View)

    in View (created by imoocApp)

    in StaticContainer (created by TabBarItemIOS)

    in RCTTabBarItem (created by TabBarItemIOS)

    in TabBarItemIOS (created by imoocApp)

    in RCTTabBar (created by TabBarIOS)

    in TabBarIOS (created by imoocApp)

    in imoocApp

    in RCTView (created by View)

    in View (created by AppContainer)

    in RCTView (created by View)

    in View (created by AppContainer)

    in AppContainer


写回答

1回答

Scott

2016-10-26

这是什么鬼,你看下你现在的 react-native 版本多少,再把代码贴出来,看看有没有用法错误

0
2
Chrome_
谢谢老师,问题已经解决了,是因为渲染页面的时候用到的state没有初始化
2016-10-27
共2条回复

贯穿全栈React Native开发App

全面掌握React Native技术,不止步前端开发,让你移动领域大放光彩

946 学习 · 385 问题

查看课程