Unsure what is a global object
BCalitz opened this issue · comments
I have multiple imports
import React from "react";
import { createStackNavigator } from "react-navigation-stack";
import { createBottomTabNavigator } from "react-navigation-tabs";
import { createDrawerNavigator } from "react-navigation-drawer";
import { createAppContainer } from "react-navigation";
import { Ionicons } from "@expo/vector-icons";
import CategoriesScreen from "../screens/CategoriesScreen";
import CategoryMealsScreen from "../screens/CategoryMealsScreen";
import MealDetailScreen from "../screens/MealDetailScreen";
import FavioritesScreen from "../screens/FavioritesScreen";
import FiltersScreen from "../screens/FiltersScreen";
import Colors from "../constants/Colors";
This is where my problem comes from as whenever I go onto a new screen it pops up again.
Can you tell me what to change
If you need me to send the rest of the code tell me.
The problem is with expo 40.0.0. Downgrading will solve the problem.
@imsuraj17 - no, that is wrong. this is an intentional deprecation.
please refer to https://github.com/expo/fyi/blob/master/deprecated-globals.md
the "global" object is window
or global
, so in some places libraries have used code like this:
global.__expo.Constants
rather than
import Constants from 'expo-constants';
we are removing global.__expo
and global.Expo
in SDK 41. SDK 40 is where we have deprecated it. you will have a harder time in SDK 42 if you haven't resolved this because your app will just crash when it loads, rather than showing you a useful warning like right now. again, refer to https://github.com/expo/fyi/blob/master/deprecated-globals.md for how to resolve