DEV Community

Ajmal Hasan
Ajmal Hasan

Posted on

React Native Config Setup/Usage for multiple environment setup

When it comes to configuration/environment management in React Native, one popular library that can be useful is react-native-config. This library allows you to manage configuration variables and environment-specific settings in your React Native project.

a) Follow this link for integration in Android part.
React Native Config Integration & Usage Android

b) Follow this link for integration in iOS from point 5 to 8
React Native Config Integration & Usage iOS

Note:
For iOS Usage run in terminal
i) killall node
ii) npm start -- --reset-cache
iii) yarn ios:dev or yarn android:prod

c) Usage:

import config from 'react-native-config';

let envVar = config.APP_CONFIG
Enter fullscreen mode Exit fullscreen mode

Top comments (0)