I saw react native elements - Card component working like this.
<Card>
<Card.Title>blahblah</Card.Title>
<Card.Divider />
</Card>
I want to create a component with such sub component like Title and divider.
I can create a component like this.
class A extends Component {
}
How can I add a subcomponent(let's say Title) to A component?
Subcomponents are objects like the component itself but, they are passed to the main component as its keys. These two liks can be good help:
https://dev.to/ms_yogii/create-react-subcomponents-in-a-simple-way-5h1f
https://dev.to/shayanypn/buckle-with-react-sub-component-10ll