part10c -- Constant.manifest is deprecated
ElvannAbendroth opened this issue · comments
The course material suggests Constants.manifest
to access environment variables, but it is deprecated. Use Constants.expoConfig
Example given must be changed to this:
import { NativeRouter } from 'react-router-native';
import { ApolloProvider } from '@apollo/client';
import Constants from 'expo-constants';
import Main from './src/components/Main';
import createApolloClient from './src/utils/apolloClient';
const apolloClient = createApolloClient();
const App = () => {
console.log(Constants.expoConfig);
return (
<NativeRouter>
<ApolloProvider client={apolloClient}>
<Main />
</ApolloProvider>
</NativeRouter>
);
};
export default App;
Further material might also need to be updated.
Important Version Note
I've updated the dependencies to use Expo version 50, and use node version 18 for my project to allow for mobile development. Opened a previous issue about it.