How do i hide forever these warning messages?


#1

import {
View,
Text
} from ‘react-native’;

// import { MapView } from ‘expo’;

import React from ‘react’;
import { Components } from ‘expo’;

// class MapScreen extends Component {
class MapScreen extends React.Component {
render() {
return (
<View style={{flex: 1}}>
<Components.MapView
style={{ flex: 1 }}
initialRegion={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
/>

);
}
}

export default MapScreen;


#2

console.disableYellowBox = true;


#3

@ccheever where do i place this text ?

this is my main.js starting point of the app.

import Expo from ‘expo’;
import React from ‘react’;
import { StyleSheet, Text, View } from ‘react-native’;

import { TabNavigator, StackNavigator } from ‘react-navigation’;
import { Provider } from ‘react-redux’;

import store from ‘./store’;

import AuthScreen from ‘./screens/AuthScreen’;
import WelcomeScreen from ‘./screens/WelcomeScreen’;
import MapScreen from ‘./screens/MapScreen’;
import DeckScreen from ‘./screens/DeckScreen’;
import SettingsScreen from ‘./screens/SettingsScreen’;
import ReviewScreen from ‘./screens/ReviewScreen’;

class App extends React.Component {
render() {
const MainNavigator = TabNavigator({
welcome: { screen : WelcomeScreen },
auth: { screen : AuthScreen },
main: {
screen: TabNavigator ({
map: { screen: MapScreen },
deck: { screen: DeckScreen },
review : {
screen: StackNavigator ({
review: { screen: ReviewScreen },
settings: { screen: SettingsScreen },
})
}
})
}
}, {
navigationOptions: {
tabBarVisible: false
},
lazy: true
});

return (





);
}
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: ‘#fff’,
// alignItems: ‘center’,
justifyContent: ‘center’,
},
});

Expo.registerRootComponent(App);


#4

try putting it right after your imports but before the rest of your code.


#5

@ccheever , Do you know how to disable the yellows warning of the console ? Not just on the Phone. We have this and it is diffcult to debug.

Thanks!