我在浏览器控制台中得到以下反应异常,似乎React不支持jsp标签,有人可以确认吗?如果它们得到支持,那么解决方案是什么?
代码:
render: function() {
var defaultComp=this.state.defaultComp;
var defaultUI=[];
for(var compIndex=0;compIndex<defaultComp.length;compIndex++){
//Push label first
defaultUI.push(
<form:label path={defaultComp[compIndex]['path']}>
{defaultComp[compIndex]['label']}
</form:label>
);
if(defaultComp[compIndex]['type']==='input'){
defaultUI.push(
<form:input path={defaultComp[compIndex]['path']} />
);
}else{
}
defaultUI.push(<br/>);
}
return (
<div id="section">
<form:form action="display-makes.html"
method="post" commandName="configuration">
{defaultUI}
</form:form>
</div>
);
}
&#13;
browser.min.js:7 Uncaught SyntaxError: http://localhost:8080/Neo/resources/js/script.jsx: Line 48: Namespace tags are not supported. ReactJSX is not XML.
46 | //Push label first
47 | defaultUI.push(
> 48 | <form:label path={defaultComp[compIndex]['path']}>
| ^
49 | {defaultComp[compIndex]['label']}
50 | </form:label>
51 | );