There was an error while loading. Please reload this page.
See the reason behind the update
Rename the import from 'react-native-dotenv' to '@env':
Before:
import {API_URL, API_TOKEN} from 'react-native-dotenv'
After:
import {API_URL, API_TOKEN} from '@env'
Make sure to add module:react-native-dotenv to the list of babel plugins from the list of presets
module:react-native-dotenv
module.exports = { presets: ["module:metro-react-native-babel-preset"], plugins: [ "module:react-native-dotenv", ... ] };
.
If you are also using babel-plugin-dotenv-import, make sure you pick one or the other as this repo is a fork of that repo.
babel-plugin-dotenv-import