【发布时间】:2020-01-23 22:50:03
【问题描述】:
此文件导入
class Footer extends Component {
_notifications = () => {
const { navigate } = this.props.navigation;
navigate('Ntf', {});
}
render() {
return (<TouchableHighlight onPress={() => this._notifications()} ></TouchableHighlight>);
}
}
这个文件主要(React-Navigation - NavigationDrawerStructure)。
import { Footer } from './Footer';
export default class HomePage extends Component {
render() {
return (<View><Footer/></View>);
}
出现错误后单击 _notifications 按钮:未定义是一个对象 c.props.navigation.navigate 请帮帮我
【问题讨论】:
标签: react-native react-navigation expo react-navigation-drawer