亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

IE下報錯“Objects are not valid as a React child”

IE下報錯“Objects are not valid as a React child”

Smart貓小萌 2018-12-19 18:18:40
錯誤描述:Objects are not valid as a React child. If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of Root.我知道react child不能是一個對象,需轉成數組或者字符串 ,但是我沒在我的Root類里發現這樣的錯誤,而且這個bug只在IE下出現,這個錯誤信息是指Root類本身有問題還是說Root類里所有可能渲染的組件有問題import React, { Component, PropTypes } from 'react'import { Provider } from 'react-redux'import { Router, browserHistory } from 'react-router'import { syncHistoryWithStore } from 'react-router-redux'import routes from './routes'export default class Root extends Component {  render() {    const { store } = this.props    const history = syncHistoryWithStore(browserHistory, store)        // render Root, and Router, which will load specific component when an URL is loaded    return (      <Provider store={store}>        <div>          <Router history={history} routes={routes} />        </div>      </Provider>    )  }}```
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 1467 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號