我正在做一个项目,我想在从 Ajax 成功登录后加载另一个组件或模块,我们可以用 react 来做吗
$.ajax({
url: url_root+"/auth/token",
dataType: 'json',
type: method.post,
data: data,
success: function(data) {
console.log(data);
// redirect... to another page
}.bind(this),
error: function(xhr, status, err) {
console.error(status);
this.setState({username : true, password :true});
}.bind(this)
});