Hello everyone, I can not understand why the function is undefined but at the same time it is called ....
datastore:

onLoadUser: function (user) { Api.loadUser(user) .then((user) => alert(Actions.loadUser.completed(user))) <===== undefined .catch((err) => console.log(err.error)); }, onLoadUserCompleted: function (user) { console.log(user); <===== в консоль выводится }, 
  • what exactly undefined ? - Grundy

1 answer 1

alert displays undefined , because the Actions.loadUser.completed function returns nothing .

But as with this, the function itself is - it is executed.