Tôi hiện có hai tệp, một số app.js
và index.html
và khi tôi cố gắng hiển thị biểu mẫu với một số lớp CSS, phần tử HTML hiển thị nhưng các lớp bị thiếu.Phản hồi không hiển thị các lớp trên các phần tử
Đây là tôi app.js
:
var Form = React.createClass({
handleClick: function() {
alert('click')
},
render: function() {
return (
<div>
<input class='form-control' type='text' name='list-name'/>
<button class="btn btn-primary" onClick={this.handleClick}>Submit</button>
</div>
);
}
});
ReactDOM.render(<Form/>,document.getElementById('app'));
Đây là cơ HTML của tôi:
<div class="container">
<h1>Title</h1>
<div id="app" class="center"></div>
</div>