Write a React component that conditionally displays 'Logged In' or 'Logged Out' based on a hardcoded boolean state.
EasyProblem Statement
Write a React component that conditionally displays 'Logged In' or 'Logged Out' based on a hardcoded boolean state.
Sample Input
isLoggedIn = true
Sample Output
Logged In (if true) or Logged Out (if false).
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const LoginStatus = () => { const isLoggedIn = true; // Hardcoded state return ( // Conditionally display "Logged In" or "Logged Out" <></> ); }; export default LoginStatus;