React-native-config: json support instead of .env

Created on 29 Apr 2020  路  3Comments  路  Source: luggit/react-native-config

Because .json works well with TypeScript, I am wondering if there is support for .json files instead of .env and if this can be better documented in the readme etc?

Most helpful comment

@ORESoftware hey, if you're looking for strong typing support I have created competing library that offers this: https://github.com/maxkomarychev/react-native-ultimate-config

All 3 comments

I solved this by writing a (bad but working) node.js script to generate the types from .env files.

I wrote about it here. Hope it helps.
https://osamaq.com/react-native-generating-typescript-types-for-environment-variables/

probably easier to generate the .env files from a node.js file

@ORESoftware hey, if you're looking for strong typing support I have created competing library that offers this: https://github.com/maxkomarychev/react-native-ultimate-config

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p-grzelczak picture p-grzelczak  路  5Comments

Quadriphobs1 picture Quadriphobs1  路  3Comments

jstlaurent picture jstlaurent  路  4Comments

francisrod01 picture francisrod01  路  3Comments

sonlexqt picture sonlexqt  路  4Comments