EXPORTS/IMPORTS ONE-TO-ONE AT A GLANCE

Name Export | Name Import

export const num = 12;
import { num } from '...';

Default Export | Default Import

export default myFunc
import <youMakeUpName> from '...'

Rename Export | NamedImport

export {person as newPerson}
import {newPerson}

Name + Default | Import All

export const num = 22;
export default myFunc;
import * as anyName from '...';

console.log(anyName.num, anyName.myFunc());

Export List + Rename | Import List + Rename

export { num1, num2 as newNum2 };
import { num1 as newNum1, newNum2 } from '...';
  1. Learning Objectives, (no answers)
  2. Learning Objectives With Answers
  3. Imports CheatSheet
  4. Exports CheatSheet
  5. Imports, Exports One-to-One