Thursday, 19 July 2018

javascript - Cannot find reason: React: Redirects onclick does not work but other redirects work(Link works and history.push also works)

All the other redirects (conditional redirects) work perfectly but not the one in the button
(using works perfectly fine)
Doesnot redirect when the button is clicked



I have implemented one more redirect in another page on a button click and it works perfectly fine






 render() {
const { props } = this

if (this.props.isauthed) {
if (this.state.usertype == 'user') {
return
} else {
if (this.state.usertype == 'customer') {
return

} else {
return (







)

}
}
} else {
return
}

}


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...