I have started to learn React Native and as always begin by creating reusable components. I learnt how you can pass and access props while creating custom components.
I
class BaseComponent extends Component {
render() {
return (){
}
}
}
class HomeScreen extends Component {
render() {
return (){
}
}
}
where Header
component is also a separate reusable component.
you need to pass props(in our case 'title') from the upper level component to base level components like the above example.