Hello!
I want to know how to avoid setting key values inside this file using env vars.
{ "default": { "heapAutoInit": true },
"dev": { "heapAutoInit": true, "heapAppId": "YOUR_DEV_APP_ID" },
"prod": { "heapAutoInit": true, "heapAppId": "YOUR_PROD_APP_ID" } }
What I tried is to convert the json file as a js file exporting de object
And then importing the react-native-config library, it didn’t thrown an error but didn’t track anything :
import Config from ‘react-native-config’
export default{ "default":
{ "heapAutoInit": true },
"dev": { "heapAutoInit": true, "heapAppId": Config.HEAP_DEV },
"prod": { "heapAutoInit": true, "heapAppId": Config.HEAP_PROD } }
There is a better approach for that?
Looking forward to hearing from you soon.
Thanks
Best answer by ALabs I Bhupender
View original