I know a similar question was asked before but it doesn't quite answer what I'm trying to understand.
I'm reading the mobx-state-router tutorial and it has this piece of code:
{
name: 'department',
pattern: '/departments/:id',
onEnter: (fromState, toState, routerStore) => {
const { rootStore: { itemStore } } = routerStore;
itemStore.loadDepartmentItems(toState.params.id);
return Promise.resolve();
}
},
I don't understand what this Promise.resolve()
relates to? Which promise is it? How/when is it resolved?