I am trying to show the 'edit-btn' only if the user is logged in. What is the best way to achieve this in ReactJS? By rendering the component without the element if not logged in and rendering the element if the user is logged in? If so, what is the best approach to achieve this? I am quite new to ReactJS.
class LeftBlock extends React.Component {
render() {
return (
<div className="left-block">
{this.props.children}
<a href="#" className="edit-btn"><i className="fa fa-pencil"></i></a>
<br className="clear" />
</div>
);
}
}