A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/goatandsheep/react-native-dotenv/wiki/Migration-Guide below:

Migration Guide · goatandsheep/react-native-dotenv Wiki · GitHub

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.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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4