I have one file containing many functions. Similar to below,
export const func1 = () => {
}
export const func2 = () => {
}
export const func3 = () => {
}
export const func4 = () => {
}
Now I want to use all this function in another file.
Method 1 is import {func1, func2, func3, func4} from 'path'
.
Method 2 (which I don't want to use) is import * as access from 'path'
Method 1 approach is what I am using right now. But when func file gets bigger, this will not be readable. So, how to use the functions without creating aliases and simply func1()
and not access.func1()
?