I am working on a project where I want to load another component or module after successful login from Ajax can we do with 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)
});