When importing a named export, what syntax must you use?

  • import { exportName } from 'module';
  • import * as exportName from 'module';
  • import { exportName } as 'alias' from 'module';
  • import exportName from 'module';
When importing a named export in ES6, you use the syntax import { exportName } from 'module';. This allows you to bring in a specific exported item from the module.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *