logout以后再点注册就不能进入到注册页面

来源:9-5 注销时清空redux数据

慕勒458955

2018-12-04

我看到 this.props.history里面的action变成了replace,请问如何解决?

写回答

1回答

THEONEjyf

2018-12-23

return this.props.user ?(
<div>
<Result
img={<img src={require(`../img/${this.props.avatar}.png`)} alt='' style={{width: 60}} />}
title={this.props.user}
message={this.props.type === 'boss'?this.props.company:null}
/>
<List renderHeader={()=>'简介'}>
<Item
multipleLine
>
{this.props.title}
{this.props.desc?this.props.desc.split('\n').map(v=><Brief key={v}>{v}</Brief>):null}
{this.props.money?<Brief>薪资:{this.props.money}</Brief>:null}
</Item>
</List>
<WhiteSpace></WhiteSpace>
<List>
<Item onClick={this.logout}>退出登录</Item>
</List>
</div>
):
(this.props.redirectTo?<Redirect to={this.props.redirectTo} />:null)


0
0

Redux+React Router+Node.js全栈开发

全网唯一的React 16+Redux+React Router4实战课程,学到手是你的真本领!

1822 学习 · 750 问题

查看课程