Hi I'm building a single page app using react.js for the first time, I'm struggling really badly with syntax here. I simply want to change the login button to a logout button when the user has signed in. Where am I going wrong?
render() {
const isLoggedIn = this.state.isLoggedIn;
return (
if (isLoggedIn) {
<div className="authentication">
<button>Logout</button>
</div>
} else {
<a href='http://localhost:8888'>
<button>Login</button>
</a>
}
);
}