Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LoginPage] Cannot read property 'push' of undefined #11

Open
rusty795 opened this issue Mar 27, 2018 · 2 comments
Open

[LoginPage] Cannot read property 'push' of undefined #11

rusty795 opened this issue Mar 27, 2018 · 2 comments

Comments

@rusty795
Copy link

Unhandled Rejection (TypeError): Cannot read property 'push' of undefined
at line
submit=(data)=>this.props.login(data).then(()=>this.props.histroy.push("/"))

Please Check.

@deniercounter
Copy link

4 month later: May be a typo?
submit=(data)=>this.props.login(data).then(()=>this.props.histroy.push("/"))

submit=(data)=>this.props.login(data).then(()=>this.props.history.push("/"))

@AmirHMousavi
Copy link

this still is not working for me. history is an undefined prop in components.
so in any component that I needed to route by function, I had to export that component withRouter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants