// definition
import One from './One'
import Two from './Two'
const classes = { One, Two }
export default function dynClass(name) {
return classes[name]
}
// usage
import dynClass from './dynClass'
const UnknownClass = dynClass('One')
new UnknownClass(props)