I'm learning react and can create components in different js files. But I would like to know if there is a way to create Main class with sub1 and sub2 components. And call components like this
import Main from './dir/main';
export default class Settings extends React.Component {
render () {
return (
<div>
<Main.sub1>
<Main.sub2/>
</div>
)
}
}