You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//cx.props.styleisOption<&'a str>rsx!( div { style: cx.props.style.unwrap_or_default() })
Above code would result in <div style>
Is there a way to not add the style property at all if cx.props.style is None
(except wrapping two different div {} in an if/else and render one if style is Some(..) and the other if it is None)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Above code would result in
<div style>
Is there a way to not add the
style
property at all ifcx.props.style
isNone
(except wrapping two different
div {}
in anif
/else
and render one ifstyle
isSome(..)
and the other if it isNone
)Beta Was this translation helpful? Give feedback.
All reactions