How to access nested screen using expo linking

74 Views Asked by At

Here you can see in the last I tried to pass the URL of PaymenntMethod screen which is already defined in the stacks, I have the structure like this I am using the tabs in my react native application Home > More (Tab) > MyWallet (Screen) > PaymentMethod (Screen)

export const WalletStackScreen = () => {
  return (
    <EnterprisePromotionStack.Navigator screenOptions={stackOptions}>
      <EnterprisePromotionStack.Screen name='MyWallet' component={MyWallet} />
      <EnterprisePromotionStack.Screen name='PaymentMethod' component={PaymentMethod} />
    </EnterprisePromotionStack.Navigator>
  )
}

Above I mentioned the stacks, and the linking config are as follows

export const LinkingConfig = {
  prefixes: [Linking.createURL('/')],
  config: {
    screens: {
      Home: {
        path: 'home',
        screens: {
          'PROMOTIONS': {
            path:'Promotions',
            screens: {
              PromotionDetails:':id'
            }
          },
          'MENU': {
            path: 'More/MyWallet',
            // screens: 'PaymentMethod'
            screens: {
              PaymentMethod: ''
            }
          },
        }
      },
      Login: 'login'
    }
  }
}

I want the exact structure and the path which will be redirected to PaymentMehod Screen

0

There are 0 best solutions below