Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react export multiple component from index.js

// Default export (recommended)
export {default} from './MyClass' 

// Default export with alias
export {default as d1} from './MyClass' 

// In >ES7, it could be
export * from './MyClass'

// In >ES7, with alias
export * as d1 from './MyClass'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #export #multiple #component
ADD COMMENT
Topic
Name
7+5 =