Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 987 Bytes

File metadata and controls

76 lines (54 loc) · 987 Bytes
description Module
keywords es,es6,js
title module
toc_max 4

module

module two elements

  • export
  • import

export

single default export

export default class User{
  .........
}

multiple export

export add = () = {...}
export minus = () = {...}
 add = () = {...}
 minus = () = {...}
 export {add, minus};

import

all

import * from './react';

default import

import component from './react'

alias / rename

import component as comp from './react'

Named import

import {btn,badge} from './react'

only load

import './react'

sourec