how to get current routeName in react-navigation-drawer Drawer compoenent?

后端 未结 2 666
闹比i
闹比i 2020-12-11 14:36

I have created my App Navigator component with these libraries

  1. react-navigation
  2. react-navigation-stack
  3. react-navigation-drawer and drawer is
2条回答
  •  一整个雨季
    2020-12-11 15:05

    You Need to Used contentComponent in DrawerNavigator.

    View style={[styles.screenStyle, (this.props.activeItemKey=='ScreenC') ? styles.activeBackgroundColor : null]}>
                        Screen C
                    

提交回复
热议问题