React-native-router-flux: drawerIcon not working

Created on 21 Sep 2017  路  8Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux: 4.0.0-beta.21
  • react-native: 0.47.1 (within CRNA)

Expected behaviour

Should have a drawer icon.

Actual behaviour

No drawer icon.

Steps to reproduce

Add a drawerIcon of any Component. Open the app and find nothing there.

<Drawer
    key='drawer'
    contentComponent={DrawerContent}
    drawerIcon={() => <Text>Here</Text>}
    >
     <Stack key='app' hideNavBar default='first'>
        <Scene key='first' title='I have no drawer icon' component={SomeComponent}>
    </Stack>
</Drawer>

All 8 comments

I am having a same problem. Any updates?

Same issue here.

I believe I may have a hint to the cause of this. "React-native-router-flux" is now tied to the frequently changing beta APIs of "react-navigation".

Within "react-navigation", drawerIcon does not actually refer to the menu icon controlling the drawer. "React-navigation" uses the API to autogenerate menu items in a drawer, with optional (drawer) icons. This is not clear from the current docs.

See the react-navigation drawer example.

@ShMcK, and how to set up drawerIcon now ?
I tried to do as in example that you show, using navigationOptions, on page, but it does not work too.

I'm not sure how to get this to work with "react-native-router-flux". In my own project, I've switched to "react-navigation" instead.

drawerIcon={DrawerIcon} is working in my case

This is not working for me aswell, someone have a light?

drawerIcon={<DrawerIcon/>} works for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VictorK1902 picture VictorK1902  路  3Comments

willmcclellan picture willmcclellan  路  3Comments

sylvainbaronnet picture sylvainbaronnet  路  3Comments

GCour picture GCour  路  3Comments

xnog picture xnog  路  3Comments