4 ms·
For the first example, if you're willing to risk a stage-0 transform, you could try using a shiny do expression: render() { return <div> {do {
by andrewingram 10y ago
For the first example, if you're willing to risk a stage-0 transform, you could try using a shiny do expression:
render() {
return <div>
{do {
if (loggedIn) { <a>Logout</a>; }
else { <form onSubmit={ ... } />; }
}}
</div>
}