I do not get an error when I delete the component menu I created specially from where I put it, but I get an error when my component is there. Thank you for your comments already.
import Menu from './Navigator'
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faBars } from '@fortawesome/free-solid-svg-icons';
export default class HeaderLeft extends Component {
constructor(props){
super(props);
this.state={check:false}
}
render() {
return (<SafeAreaView><View onStartShouldSetResponderCapture={() => { this.setState({ check: !this.state.check }) }} style={styles.align}>
<FontAwesomeIcon icon={faBars} size={16} color={"#2D6A4F"} /><Menu check={this.state.check}></Menu></View></SafeAreaView>)
}
}
const styles = StyleSheet.create({
align: {
height: 60, display: 'flex', justifyContent: 'center', padding: 20
},
});```
Have a try by making the changes as the below code in your code.:
add below in the constructor:
Add below method:
Make changes as below in View