Javascript 反应片段为';输入组件的t工作
有没有其他方法可以在不使用React.Fragment的情况下编写以下代码,因为这样做不起作用Javascript 反应片段为';输入组件的t工作,javascript,reactjs,react-native,Javascript,Reactjs,React Native,有没有其他方法可以在不使用React.Fragment的情况下编写以下代码,因为这样做不起作用 <FormGroup> <Input type="select" name="selectMultiPrefs" id="MultiPrefs" multiple> {this.state.arrayForCategs.map(function (CategName, index) {
<FormGroup>
<Input type="select" name="selectMultiPrefs" id="MultiPrefs" multiple>
{this.state.arrayForCategs.map(function (CategName, index) {
return (
<React.Fragment key={keyNum++}>
<option key={keyNum++} value={CategName} disabled>{CategName}</option>
{that.props.general.adprefrec.map(function (AdSingle, index) {
<option key={keyNum++} value={AdSingle.prefid}>{AdSingle.name}</option>
})}
</React.Fragment>
)
})}
</Input>
</FormGroup>
{this.state.arrayForCategs.map(函数(CategName,index){
返回(
{CategName}
{that.props.general.adprerec.map(函数(AdSingle,index){
{AdSingle.name}
})}
)
})}
这不起作用,因为没有
这样的东西
您想使用
看