How to use @react-navigation/compat - 1 common examples

To help you get started, we’ve selected a few @react-navigation/compat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-navigation / navigation-ex / example / src / Screens / CompatAPI.tsx View on Github external
Push article
        </Button>
        <Button
          mode="outlined"
          onPress={() => navigation.goBack()}
          style={styles.button}
        >
          Go back
        </Button>
      </View>
      <Albums />
    </React.Fragment>
  );
};

const CompatStack = createCompatNavigatorFactory(createStackNavigator)<
  StackNavigationProp<CompatStackParams>
>(
  {
    Article: {
      screen: ArticleScreen,
      params: {
        author: 'Gandalf',
      },
    },
    Album: AlbumsScreen,
  },
  {
    mode: 'modal',
  }
);

@react-navigation/compat

Compatibility layer to write navigator definitions in static configuration format

MIT
Latest version published 1 year ago

Package Health Score

78 / 100
Full package analysis

Popular @react-navigation/compat functions