Вам нужно привязать обратный вызов к вашему текущему контексту, вы можете сделать это с помощью функции стрелки.
Кроме того, оператор return внутри обратного вызова не делает то, что, по вашему мнению, делает, это значениепотерян, вы должны нажать новый маршрут, используя объект истории
handleSubmit(event) {
event.preventDefault();
Accounts.createUser(
{
username: this.state.mobile,
password: "123"
},
err => { // here use the arrow function to bind to the current "this"
if (err) {
console.log("err", err);
} else {
console.log("account created");
this.setState({
redirect: true
});
hashHistory.push("/"); // push the next route
}
});
}