Javascript - sirdnt/quintessence GitHub Wiki

Some tip & trick in javascript

Import and export

Named Export

do export

export const MyFunction = () => {}
export const MyConst = 'const'

do import

import {MyFunction, MyConst} from './myfile.js'

or

import * from './myfile.js'

Default Export

const App = () => {}
export default App;

do import

import MyApp from './app.js'

the naming in import is independent in export so we can do what ever name we prefer
see more here