需要加载我的主组件,如果存在值为"logged: true“的本地存储,则使用react-router重定向到"/app”。我正在使用react-redux,这是我的代码:// Return true in reduxstate if localstorage is found
this.props.checkLo
class Burger extends Component{
this.props.init() //dispaching action so tovariable "Purchased" false console.log(purchased) //it is still true ;因此,我关心的基本上是,即使通过componentWillMount,购买的
在ComponentDidMount()函数中,我在React Redux存储中设置了一些值。Redux Dev Tools显示状态已更新。但在props中,它不会改变。dv.setItems(this.props.slickData);
即使在存储中更新了状态,我仍然无法获取道具中的数据?为什么?有什么想法吗?实际上,网格实例