#How to hide navbar?
7 messages · Page 1 of 1 (latest)
yes,
(yourBooleanCondition && <Navbar>Contents...</Navbar>)
alternatively if you are using it as a prop in AppShell
<AppShell
navbar={yourBooleanCondition ? <Navbar>Contents</Navbar> : undefined}
// rest of props
>
// rest of code below
The conditional (ternary) operator is the only JavaScript operator that takes three operands:
a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy.
This operator is frequently used as an alternative to an ...
oh thanks
I used null instead of undefined