我使用React Native 0.16(Android)时遇到了麻烦.问题是如何将props传递给属于组件的Navigator.NavigationBar的routeMapper.<Navigator />
我的代码结构如下
class MyApp extends Component {
...
static NavigationBarRouteMapper = {
LeftButton(route, navigator, index, navState) {
// ### I want to call 'functionABC' here. What Should I do?
},
RightButton(route, navigator, index, navState) {
// ### I want to call 'functionABC' here. What Should I do?
},
Title(route, navigator, index, navState) {
// ### I want to call 'functionABC' here. What Should I do?
},
}
...
functionABC() {
...
}
... …Run Code Online (Sandbox Code Playgroud)