在Component React本机路由器通道中调用onLeft

时间:2016-10-25 09:18:12

标签: react-native navigation-drawer react-native-router-flux

我在项目中使用了React Native Router Flux。如何在Welcome组件上触发onRight功能?我只能在NavigationController类上调用函数。

 export default class NavigationController extends Component {

        render() {
            return (

                <Drawer
                    ...>
                    <Router>
                        <Scene key="root">
                            <Scene key="intro" passProps={true} drawer={this} hideNavBar={true} component={Intro}
                                   initial={true}/>
                            <Scene key="welcome"
                                   component={Welcome}
                                   onRight={() => alert("right")}
                                   rightButtonImage={require('./assets/plus_blue.png')}
                                   />
                        </Scene>
                    </Router>
                </Drawer>

            );
        }
    }

0 个答案:

没有答案