Skip to content

Instantly share code, notes, and snippets.

@erickhaendel
Created September 11, 2019 03:01
Show Gist options
  • Save erickhaendel/cbebc07518936a2e14d427e87dc3f939 to your computer and use it in GitHub Desktop.
Save erickhaendel/cbebc07518936a2e14d427e87dc3f939 to your computer and use it in GitHub Desktop.
Named Export Example
// Imports
// Ex. importando um named export
import { MyComponent } from "./MyComponent";
// Ex. importando multiplos named exports
import { MyComponent, MyComponent2 } from "./MyComponent";
// Ex. Alterando o nome do modulo importado usando "as":
import { MyComponent2 as MyNewComponent } from "./MyComponent";
// Arquivo com os componentes para exportação
// Exports do arquivo ./MyComponent.js
export const MyComponent = () => {}
export const MyComponent2 = () => {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment