I am having difficulties writing an if statement in React (bit new to this)
class TEST extends React.Component {
render() {
const TEST = props => {
if (props.isLoggedin("True")) {
return (
<Welcome />
);
}
return (null);
};
}
}
export default Switch(TEST);
The error message that I am getting is:
Your render method should have return statement
Not sure the best way to write this? Thanks