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

how to get the type of navigation state in react native

$
0
0

I want to keep an old navigation type from previews versions under 5 , now upagrading to 6 and I see that a lot things are changed

after a some research I found that example

const NavigationOptions = {  type: 'stack';  key: 'stack-1';  routeNames: ['Home', 'Profile', 'Settings'];  routes: [    { key: 'home-1'; name: 'Home'; params: { sortBy: 'latest' } },    { key: 'settings-1'; name: 'Settings' },  ];  index: 1;  stale: false;};

the old one was created like this

import { NavigationRoute, NavigationScreenConfig } from 'react-navigation';import { NavigationStackOptions } from 'react-navigation-stack';import { NavigationStackProp } from 'react-navigation-stack/src/types';type NavigationOptions<Props = unknown> = NavigationScreenConfig<  NavigationStackOptions,  NavigationStackProp<NavigationRoute, Props>>;

any help with that one , thanks.


Viewing all articles
Browse latest Browse all 6597

Trending Articles



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