-
In React I can render a component based on a condition with Logical && Operator. function Mailbox(props) {
const unreadMessages = props.unreadMessages;
return (
<div>
<h1>Hello!</h1>
{ unreadMessages.length > 0 &&
<h2>
You have {unreadMessages.length} unread messages.
</h2>
}
</div>
);
} Is there similar option in Leptos? May be something like fragment so we can use it in else condition? |
Beta Was this translation helpful? Give feedback.
Answered by
gbj
May 19, 2024
Replies: 1 comment 2 replies
-
Have you read the Control Flow chapter of the docs? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
s1n7ax
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you read the Control Flow chapter of the docs?