ヒゲ括弧なしなら式なのでreturnは不要、ヒゲ括弧の中なら文なのでコールバックから値を得るならreturnで渡す。ただの省略じゃないのが難しいんだよねえ…

Arrow function expressions - JavaScript | MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.zunda.ninja/users/zundan/statuses/115863790777158708 on your instance and quote it. (Note that quoting is not supported in Mastodon.)