I'm importing multiple classes like below. It's working fine however is there a way to loop App? So that I dont need to copy paste it everytime. That way is more dynamic if i add a new export in app.js.
import * as App from 'app.js';
const load = new App.Load();
const tooltip = new App.Tooltip();
const pagination = new App.Pagination();
const search = new App.Search();
const modal = new App.Modal();
const error = new App.Error();
if I loop it all the classes are visible.
for (const class in App) {
console.log(class);
};
In the loop it needs to have someting like;
const [class] = new App.[class]();