victorkvarghese / react-native-boilerplate

🚀 Type Based Architecture for developing React Native Apps using react, redux, sagas and hooks with auth flow
MIT License
602 stars 210 forks source link

Specify initial route. #3

Closed hasan-sh closed 5 years ago

hasan-sh commented 5 years ago

Very nice structure - Thanks @victorkvarghese

After I ran the app, I wanted to check which screen is rendered first, that took me a minute to figure it out. Because in the NavigationStack.js I couldn't see which one is the initial route.

I understand now what you place as a first property to the config object that you pass to the createStackNavigator, becomes the first route that renders. However, passing another object with initialRouteName property makes it easier to read and understand.

I am new to RN, let me know if that does/n't matter.

hemel-cse commented 5 years ago

Hi @hasanshahoud, I have built few screen with this boilerplate. You can look into here to understand the navigation's.

victorkvarghese commented 5 years ago

When the number of screens are too far high, its better to use initialRouteName which might help debugging

Closed #ed12b30