Showing posts with label yellow warning box. Show all posts
Showing posts with label yellow warning box. Show all posts

11 February 2020

Disable yellow warning box example in react native

  • Create Components folder under src folder
  • Add DisableYellowWarningBoxEXP.js file and add below Code
import React, { Component } from "react";
import { View } from "react-native";

 console.disableYellowBox = true;

export default class DisableYellowWarningBoxEXP extends Component {
  render() {
    return <View>{/*Your Code will be here*/}</View>;
  }
}
  • Open App.js file and update code as below

import React from 'react';
import { View,StyleSheet } from 'react-native';
import DisableYellowWarningBoxEXP from './src/Component/DisableYellowWarningBoxEXP'

 const  App=()=> {
  return (
    <View style={styles.container}>
      <DisableYellowWarningBoxEXP/>
    </View>
  );
}
export default App;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    paddingTop:80
  },
});