pluralsight-react-native-getting-started icon indicating copy to clipboard operation
pluralsight-react-native-getting-started copied to clipboard

api.js file from Lesson 4: Expo.Constants.manifest

Open ltaljaard opened this issue 5 years ago • 1 comments

At around 2:04 of the Fetching data from an HTTP API lesson, where you say const { manifest } = Expo.Constants; Untitled 33

This leads to a runtime error which reads "Cannot read property 'Constants' of undefined"

Expo.Constants is inspectable in Chrome debugging so it's not like Constants is unavailable: Untitled 34

This is how the error looks in the iOS simulator: Untitled 35

Could you shed some light on this error?

ltaljaard avatar Sep 18 '19 19:09 ltaljaard

declare the following:

import Constants from 'expo-constants';

const { manifest } = Constants;

zdwyer711 avatar Jan 09 '20 02:01 zdwyer711