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