componentWillUpdate()和componentDidUpdate()调用正确的内容,呈现不更新

问题描述:

我有这样的反应成分:https://gist.github.com/emilevictor/007a10aa1669829feb940b9548e582a1componentWillUpdate()和componentDidUpdate()调用正确的内容,呈现不更新

我拍摄过一个终极版的传奇去从服务器获取一些数据。它已成功设置在this.props.statistics中,并且重新呈现被触发。这些函数正确调用按以下顺序时的状态Redux的改变:

componentWillUpdate(...) 渲染(...) componentDidUpdate(...)

话虽如此, DOM不会更改以反映this.props.statistics中的新数字。有谁知道什么可能会出错?

这是由于这两条线路:

const LayoutWrapper = props => (
    <ChartWrapper> 
    <Async 
     load={import(/* webpackChunkName: "ReactChart2-layoutWrapper" */ "../../../components/utility/layoutWrapper")} 
     componentProps={props} 
    /> 
    </ChartWrapper> 
); 

const PageHeader = props => (
    <Async 
    load={import(/* webpackChunkName: "ReactChart2-pageHeader" */ "../../../components/utility/pageHeader")} 
    componentProps={props} 
    /> 
); 

一旦取消,他们固定的问题。想知道为什么它会产生这种效果的更多细节。