Methods:
1. if/else:
1function Greeting({ isLoggedIn }) {2 if (isLoggedIn) return <h1>Welcome!</h1>;3 return <h1>Please log in</h1>;4}
2. Ternary:
1<div>{isLoggedIn ? <Welcome /> : <Login />}</div>
3. Logical &&:
1<div>{unreadCount > 0 && <Badge count={unreadCount} />}</div>
4. Early return:
1function Dashboard({ user }) {2 if (!user) return <Redirect to="/login" />;3 return <div>Dashboard</div>;4}
Pitfalls: && with falsy values (renders 0), ternary readability, complex conditions: extract to variable.