Why Is `Export Default Const` invalid?

const is like let, it is a LexicalDeclaration (VariableStatement, Declaration) used to define an identifier in your block. You are trying to mix this with the default keyword, which expects a HoistableDeclaration, ClassDeclaration or AssignmentExpression to follow it. Therefore it is a SyntaxError. If you want to const something you need to provide the identifier and not use default. export by itself accepts a VariableStatement or Declaration to its right. The following is fineexport default Tab; … Read more