Closed PierBover closed 8 years ago
special attributes like rt-props
and rt-if
don't need to be escaped with {
and }
because it's known that their argument is a javascript expression. So it's just
<div rt-props="this.state.isEditing ? {selected:this.state.something.id} : {}" >
Oh right, so of course if I escape this is a malformed object.
Thanks @nippur72 !
I'm trying to figure out how to pass conditional props using
rt-props
but I'm getting the errorRTCodeError: Unexpected token .
.The docs say:
So I tried:
Is it possible to use a ternary expression in
rt-props
? What is the correct form?