Reactjs React JSX风格指南
jsx的标准样式是什么?特别是当HTML与js交织在一起时。return后面的括号是否在正确的位置?有谁知道有什么好的格式化程序不会把一切都搞糟Reactjs React JSX风格指南,reactjs,coding-style,react-jsx,Reactjs,Coding Style,React Jsx,jsx的标准样式是什么?特别是当HTML与js交织在一起时。return后面的括号是否在正确的位置?有谁知道有什么好的格式化程序不会把一切都搞糟 render: function(){ return ( <li> <input id={this.props.id} type="checkbox" /> <label htmlFor={this.props.id}>{this.props.tag}</la
render: function(){
return (
<li>
<input id={this.props.id} type="checkbox" />
<label htmlFor={this.props.id}>{this.props.tag}</label>
</li>
);
}
render:function(){
返回(
{this.props.tag}
);
}
我喜欢使用
提供对jsx语法的良好支持
注意:您可以从Settings->code Quality
render(){
返回(
);
}
在这里找到了一本不错的风格指南
render() {
return (
<MyComponent className="long body" foo="bar">
<MyChild />
</MyComponent>
);
}