Last active
April 2, 2021 07:13
-
-
Save kaushal9678/da1e2f91fb4f9709bb1174d62e256f55 to your computer and use it in GitHub Desktop.
stack navigations and BottomTabNavigation for DeepLinking using react-navigation-5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import linking from "./src/navigation/Linking"; | |
import { | |
Colors, | |
} from 'react-native/Libraries/NewAppScreen'; | |
import { navigationRef } from './src/navigation/RootNavigaton' | |
axios.defaults.baseURL = | |
'https://europe-west1-socialape-d081e.cloudfunctions.net/api'; | |
const App = (props:any) => { | |
const isDarkMode = useColorScheme() === 'dark'; | |
const [initialised, setInitialised] = useState(false); | |
const backgroundStyle = { | |
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, | |
}; | |
return ( | |
<Provider store={store}> | |
<Navigation ref={navigationRef} colorScheme={'light'} uriPrefixe={linking.prefixes} linking={linking} /> | |
</Provider> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In these three files, I did the following things
Navigation.tsx -> here I define my app's Navigation stacks
bottomTabNavigation.tsx-> in it I use those stacks inside bottom tabs
App.tsx -> is used how to use Navigation object in
App.tsx