Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Refresh a screen after state change [Drawer navigator react-native]

$
0
0

I have a DrawerNavigator in StackNavigator. I have implemented the structure to achieve Hamburger menu function. I have a listing home page with a hamburger menu icon. On clicking the icon, I open a menu just like how it is in Amazon, flipkart apps. The menu list is dynamic, I need to refresh the list on state change.

Here is my view hierarchy:

export const DrawerMenu = DrawerNavigator({
    Search: {
        screen: Search,
    },
    SidebarMenuComponent: {
        screen: SidebarMenuComponent,
        navigationOptions: {
            headerTitle: Logo,
        }
    },
  }, {
    contentComponent: SidebarMenuComponent,
    drawerWidth: 250,
    drawerPosition: 'left',
    drawerOpenRoute: 'DrawerOpen',
    drawerCloseRoute: 'DrawerClose',
    drawerToggleRoute: 'DrawerToggle',
  });

const RootStack = StackNavigator({ 

    Search: {
        screen: DrawerMenu,
        navigationOptions: {
            headerTitle: Logo,
        }
    },

    ThankYou: {
        screen: ThankYou,
        navigationOptions: {
            headerTitle: 'ThankYou',
            gesturesEnabled: false,
        }
    },
  });

I am not able to reload it. So my question here is, how can we force to reload the list for this situation? Any help would be appreciated.

Thank you.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>