react-native#LogBox JavaScript Examples

The following examples show how to use react-native#LogBox. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: App.js    From react-native-expo-template with MIT License 6 votes vote down vote up
export default function App() {
  const images = [
    require("./assets/icon.png"),
    require("./assets/splash.png"),
    require("./assets/login.png"),
    require("./assets/register.png"),
    require("./assets/forget.png"),
  ];

  // Ignore firebase v9 AsyncStorage warning
  React.useEffect(() => {
    LogBox.ignoreLogs([
      "AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage",
    ]);
  }, []);

  return (
    <ThemeProvider images={images}>
      <AuthProvider>
        <AppNavigator />
      </AuthProvider>
    </ThemeProvider>
  );
}
Example #2
Source File: App.js    From react-native-expo-template with MIT License 6 votes vote down vote up
export default function App(props) {
  const images = [
    require("./assets/icon.png"),
    require("./assets/splash.png"),
    require("./assets/login.png"),
    require("./assets/register.png"),
    require("./assets/forget.png"),
  ];

  // Ignore firebase v9 AsyncStorage warning
  React.useEffect(() => {
    LogBox.ignoreLogs([
      "AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage",
    ]);
  }, []);

  return (
    <ThemeProvider images={images}>
      <AuthProvider>
        <AppNavigator />
      </AuthProvider>
    </ThemeProvider>
  );
}
Example #3
Source File: index.js    From expo-ticket-app with MIT License 6 votes vote down vote up
render() {
        const {
            store,
            persistor
        } = this.props;
        LogBox.ignoreAllLogs(true);

        return (
            <AnimatedSplash
                translucent={true}
                isLoaded={!this.state.loading}
                logoImage={require('../images/ic_launcher_h2t.png')}
                backgroundColor={theme.backgroundColor}
                logoHeight={185}
                logoWidth={185}
            >
                <Root>
                    <Provider store={store}>
                        <PersistGate
                            loading={<H2TLoading/>}
                            persistor={persistor}
                        >
                            {this.state.loading === false &&
                                <Router>
                                    {Routes}
                                </Router>
                            }
                        </PersistGate>
                    </Provider>
                </Root>
            </AnimatedSplash>
        );
    }
Example #4
Source File: App.js    From filen-mobile with GNU Affero General Public License v3.0 5 votes vote down vote up
LogBox.ignoreLogs(["new NativeEventEmitter"])
Example #5
Source File: App.js    From InstagramClone with Apache License 2.0 5 votes vote down vote up
LogBox.ignoreLogs(['Setting a timer']);
Example #6
Source File: index.js    From puente-reactnative-collect with MIT License 5 votes vote down vote up
// LogBox.ignoreWarnings(['VirtualizedLists should never be nested']);
LogBox.ignoreAllLogs(true);
Example #7
Source File: index.js    From puente-reactnative-collect with MIT License 5 votes vote down vote up
// LogBox.ignoreWarnings(['VirtualizedLists should never be nested']);
LogBox.ignoreAllLogs(true);
Example #8
Source File: MainNavigator.js    From app with GNU General Public License v3.0 5 votes vote down vote up
MainNavigator = () => {
	const [isReady, setIsReady] = useState(false);
	const [initialScreen, setInitialScreen] = useState('MainApp');
	const {user} = useContext(GlobalContext);

	LogBox.ignoreAllLogs(true);
	useEffect(() => {

		//? when auth will be implemented
		const checkToken = async () => {
			const user = await AsyncStorage.getItem('user');
			  if (user) {
			    setInitialScreen('MainApp');
			  }
			  else {
				setInitialScreen("Home")
			  }
			setIsReady(true);
		};
		checkToken();
	}, []);

	if (!isReady) {
		return null;
	}
	console.log(initialScreen,"in");
	return (
		<GlobalProvider>
			<NavigationContainer>
				<Stack.Navigator initialRouteName={initialScreen}>
					<Stack.Screen
						name="MainApp"
						component={MainAppNavigator}
						options={{headerShown: false}}
					/>
					<Stack.Screen
						name="Home"
						component={HomeNavigator}
						options={{headerShown: false}}
					/>
				</Stack.Navigator>
			</NavigationContainer>
		</GlobalProvider>
	);
}
Example #9
Source File: index.js    From stayaway-app with European Union Public License 1.2 5 votes vote down vote up
LogBox.ignoreLogs([
  'Animated: `useNativeDriver` was not specified.',
  'Warning: Cannot update a component from inside the function body of a different component.',
]);
Example #10
Source File: configureStore.dev.js    From mern-stack with MIT License 5 votes vote down vote up
LogBox.ignoreLogs(['Remote debugger']);