Answers for "justifyContent was given a value of middle, this has no effect on headerStyle."

0

justifyContent was given a value of middle, this has no effect on headerStyle.

//Its defaulted to center for iOS and left for Android device

<NavigationContainer>
      <NavStack.Navigator initialRouteName='Contacts'>
        <NavStack.Screen
          name='Contacts'
          component={ContactsScreen}
          options={({ navigation }) => ({
            title: "My Contacts",
            headerTitleAlign: "center",
          })}
        />
        <NavStack.Screen
          name='AddContact'
          component={ContactAddScreen}
          options={{ title: "Add Contact" }}
        />
      </NavStack.Navigator>
    </NavigationContainer>
Posted by: Guest on April-23-2020

Code answers related to "justifyContent was given a value of middle, this has no effect on headerStyle."

Browse Popular Code Answers by Language