score:3

Accepted answer

the syntax for asynchronous onenter hooks is necessarily a bit difference, since we need a way to block the transition until the handler has completed running.

if your onenter hook is asynchronous, then it needs to take a 3rd argument, e.g.

function onenter(nextstate, replacestate, callback) {
    /* ... */
}

when you do this, you have to call callback() yourself when your enter hook has finished running. it's necessary for us to use this api to support people who e.g. aren't using


Related Query

More Query from same tag