Currently diving into React-Native with Typescript and working on a project. Encountered a bug where the header color isn't changing as expected.
Any help or insight would be greatly appreciated!
-Viggo
index.tsx
import React, { Component } from 'react';
import { StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native';
import AddCity from './components/AddCity/AddCity'
import Cities from './components/Cities/Cities'
import City from './components/Cities/City'
import { createAppContainer } from 'react-navigation'
import { createStackNavigator, createBottomTabNavigator } from 'react-navigation'
import { colors } from './theme'
const CitiesNav = createStackNavigator({
Cities: { screen: Cities },
City: { screen: City }
}, {
navigationOptions: {
headerStyle: {
backgroundColor: colors.primary
},
headerTintColor: '#8e44ad'
}
})
const Tabs = createBottomTabNavigator({
Cities: { screen: CitiesNav },
AddCity: { screen: AddCity }
})
const App = createAppContainer(Tabs);
export default App;
theme.tsx
const colors = {
primary: '#D81B60',
}
export {
colors
}