coffeescript - If...then in JSX for Javascript -
i've been writing coffeescript/cjsx , valid syntax:
<div>    <input type={if @state.name == "test" "checkbox"}/> </div>   how do same plain javascript? there no if...then clause , don't think can inline if checks can in coffee?
taking answer how write inline if statement in javascript?
you can use syntax 10 < 11 ? : that ? then , : else.
Comments
Post a Comment