왜
export default function AComponent() {
...
}
는 되는데
export default const AComponent = () => {
...
}
는 안되는가?! 에서 출발했습니다.
관련 StackOverflow 질문, export 관련 ECMAScript
default
문 뒤에는 HoistableDeclaration
, ClassDeclaration
, AssignmentExpression
만 사용 할 수 있습니다.
function
, function *
class
근데 const
, let
은 LexicalDeclaration
이기 때문에 사용 할 수 없습니다.