For multiple classes
in the same js
file, extending Component
from @wordpress/element
, you can do that :
// classes.js
import { Component } from '@wordpress/element';
const Class1 = class extends Component {
}
const Class2 = class extends Component {
}
export { Class1, Class2 }
And import them in another js
file :
import { Class1, Class2 } from './classes';