nl_tokens: Setup and return dispatch function . The dispatch function will call the relevant action handler .
pl_tokens: function setupDispatch ( { actions : actionHandlers = { } , schemas = { } , services = { } , middlewares = [ ] , identOptions = { } } ) { const getService = setupGetService ( schemas , services ) let dispatch = async ( action ) => { <mask> ( 'Dispatch: %o' , action ) return handleAction ( action , { schemas , services , dispatch , identOptions , getService } , actionHandlers ) } if ( middlewares . length > 0 ) { dispatch = compose ( ... middlewares ) ( dispatch ) } return dispatch }