1. 모듈 export
export 내보내기
// export
// a.js
export const test1 = () => {
return 1;
}
export const test2 = () => {
return 2;
}
// b.js
import {test1, test2} from "./a"
// export default
// a.js
export default a
// b.js
import a from "./a"
2. firebase web
// 사용할 기능들을 export
...
export const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const db = getFirestore(app);
...
3. 제네릭 타입을 사용하는 이유
사용이유