I know that you can do the following:
let name = 'testFunc'
let functions = {
[name] () {...}
}
But is it possible to do something like this:
export function [name] () {...}
Not possible. import, export and module dependencies in general are resolved before runtime. At the time your module is imported from another module, your variable name has no meaning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With