'How to manage react native app functionality while release?

I want to implement functionality in my react native app that manages app functionality like,

config = {
   sdk1: false,
   sdk2: true
}

I want to achieve something like this. If I define sdk1 as false and sdk2 as true then all their functionality of sdk2 should be implemented in the release build as well as release build shouldn't implement any of the functions or SDK of sdk1 in the release build because it increases my app size unnecessarily.

Basically, I want the functionality in the app code where I can decide which SDK should include in the release build and which is not. I searched on the web but didn't get solutions. they are only showing me the solution like react-native-config.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source