{
this.state.isLoadingInputDropDown &&
<option value="-1" disabled >Loading...</option >
}
{/* TODO : was not able to combine below statements */}
{
!this.state.isLoadingInputDropDown
&& <option value="-1" >--Select a Accessorial Charge first --</option>
}
{
!this.state.isLoadingInputDropDown
&& this.state.allInputs.length > 0
&& this.state.allInputs.map(
(input) => (<option value={input.id} key={input.id}>{input.name}</option>)
)
}
このJSX one-linerなどをコンパクトにしようとしています。 考えられる(考えられる)構造を試しましたどのようにこのJSXをコンパクトにすることができますか?
なぜこれをよりコンパクトにしたいですか? – TryingToImprove