I have this component:
class HeaderBar extends Component<Props> { render() { return (<View style={stylesHeaderBar.header}><View style={stylesHeaderBar.menuIconContainer}><Icon name='menu' onPress={() => this.props.navigation.openDrawer()} /></View><View style={stylesHeaderBar.titleAndLogoContainer}><Image style={stylesHeaderBar.image} source={require('../../assets/icon.png')} /><Text> Restaurantes </Text></View></View> ) }}
And I want to call it from my main file like this:
<HeaderBar/>
But he forces me to pass him like this:
<HeaderBar navigation={}> </HeaderBar>
I'm new to React and I don't have much idea how it works, how can I fix it? I am using typscript.