I want to return data from onDone(). I have tried reply() function, but it is also not working.
server.route({
method: 'POST',
path: '/change-state/testing',
handler: function (request,h) {
return interpret(machine)
.onDone(e => {
console.log('_____________________')
console.log(e.data)
console.log('_____________________')
return e.data // I want to return e.data
})
.start();
}
});