jquery网络
import $ from 'jquery';
$.ajax({
url: this.props.url,
dataType: 'json',
cache: false,
success: function(data) {
this.setState({data: data});
}.bind(this),
error: function(xhr, status, err) {
console.error(this.props.url, status, err.toString());
}.bind(this)
});
Can I use jQuery with Node.js?
Node中没搞明白require和import,你会被坑的很惨