import React from 'react'; class MyComponent extends React.Component { render() { const isLoggedIn = true; return ( <div> <p>{isLoggedIn? "We have a user" : "No user"}</p> </div> ); } } export default MyComponent;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter