Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
每次都在请求完数据或从本地库拿到东西之前就渲染了,就导致报错
componentWillReceiveProps
render() { if (this.state.data) { return <View>{this.state.data}</View> } else { return <Loading /> } }
设置一个占位的view,网络请求加载后在将这个占位view设置为null