如果我用超时调用该操作没问题。
componentDidMount(){
setTimeout(()=>this.props.isLoggedIn(), 100)
}
或者如果我在渲染下调用,就没有问题了。
render() {
this.props.isLoggedIn()
...
...
仅当我在应用加载时调用 componentDidUpdate 下的操作时,才会出现此问题。像那样:
componentDidMount(){
this.props.isLoggedIn() //problem
}
导致拆分 redux 实例...