1// step one install this module
2npm install react-native-dotenv
3
4// step two add this in your babel.config.js
5 plugins: [
6 'module:react-native-dotenv',
7 {
8 moduleName: '@dotenv',
9 safe: false,
10 allowUndefined: false
11 }
12 ]
13
14 // step three add value whatever in your .env file
15 API_KEY = 434d3c04fc285d218d740e2a568387e4
16
17 // step four use this method for call environment
18 import { API_KEY } from '@dotenv'