快速处理程序中的es6和弦箭头function

有没有一个理由不使用箭头,而是expressjs中的正则函数expression式处理中间件?

app.use(mountSomething()) router.use(mountSomethingElse()) app.get('/', (req,res,next)=> { next(); }) route.get('/path', (req,res,next)=>{ res.send('send') }) 

 app.get('/', (req,res,next)=> { next(); }) 

是相同的

 app.get('/', function(req,res,next) { next(); }.bind(this)) 

在大多数情况下,您不会在处理程序中使用“this”(可能未定义),因此您可以自由使用箭头function。